octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoloading of toolboxes?


From: David Bateman
Subject: Re: Autoloading of toolboxes?
Date: Tue, 30 Jan 2007 10:31:33 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

John W. Eaton wrote:
> On 29-Jan-2007, David Bateman wrote:
>
> | I think shadowed functions should be first in the load path, otherwise
> | they will never be used. However, I think we have eliminated all of
> | these shadowed functions like FIXES/ and I don't think they should ever
> | come back.
>
> FIXES may be gone, but other functions are still shadowed, and the
> versions in Octave Forge are not always the best ones, so I think
> loading them first is not always the right thing to do.  With a
> warning, at least it would be clear that there are functions that
> overlap.  Even if we just made this warning completely optional, those
> of us working on Octave could turn it on and then we would be notified
> that there is a potential problem.
>   
Yes, the NaN toolbox etc shadow existing functions. However, in all
cases I can see they are supposed to shadow the core functions. Putting
them later in the path than the core functions just means that the
package can never work as it is supposed to.. So I believe that yes
installing first in the path is always the right thing to do.

However, I completely agree that warning of some form is needed to
prevent users getting completely unexpected behavior. A "pkg load auto"
command as discussed elsewhere in this thread also makes a lot of sense,
as then such things as the NaN toolbox should be loaded manually.

At the limit we could add a PKG_ADD statement to NaN, etc like

## PKG_ADD: warning("*** This toolbox shadows some existing core octave
function ***");

So that at the moment the user loads the package they are warned of the
consequences...

Regards
David.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]