octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47658] remove autoload feature of packages


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #47658] remove autoload feature of packages
Date: Tue, 12 Apr 2016 11:23:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #5, bug #47658 (project octave):

Carnë, thanks for the explanation in comment #2.  The following comments may
be slightly off-topic, but their gist is to say that I think dropping the
current method of auto loading is a good idea.

I think that some degree of loading on demand is still feasible and desirable.
 Currently, if a package is installed but not loaded, and a function from that
package is called, then an error is issued that tells the user which package
to load.  In the cases where Octave knows which package to load, it seems
sensible (IMHO) for Octave just to go ahead and load it rather than throwing
an error.  If there is ambiguity, then by all means throw an error.

That doesn't cause the problems with overloaded functions (since the core
version is found if the package hasn't been loaded) and doesn't cause
conflicts unless the user actually calls two functions from conflicting
packages.  It just means that a lot more scripts "just work" without the user
needing think about packages.

I can see three disadvantages:
0. The user may accidentally load a package by a typo.  That's no big problem,
especially if a warning is given when a package is loaded on demand.
0. The user may wonder why changing the order of two function calls changes
the behaviour of one of them, in the case of a shadowed function being called
before or after another function from the package.  Again, this isn't a
problem if a warning is given to remind the user that the package is being
loaded.
0. The user may find this so simple that they don't bother learning how to use
the package manager to, for example, unload one package before loading a
conflicting package.  IMHO, if the user can use the system without needing to
learn how the package manager works, that is a benefit.  It also aids Matlab
compatibility to have a script that doesn't need "pkg <...>" statements.

I'd be interested in your thoughts, even if you still think my suggestions are
a very bad idea :)

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47658>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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