octave-maintainers
[Top][All Lists]
Advanced

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

Re: package autoload


From: oheim
Subject: Re: package autoload
Date: Fri, 15 Apr 2016 14:55:47 +0200
User-agent: Posteo Webmail

Am 15.04.2016 13:42 schrieb LachlanA:
bpabbott wrote
On Apr 15, 2016, at 07:47, Juan Pablo Carbajal <

ajuanpi+dev@

> wrote:

Toolboxes in matlab do not autoload

I've been using Matlab since 1990. I don't use many toolboxes, but none of
the toolboxes I have used require loading (optimization, for example).

Afaik, loading a toolbox is as simple as placing it in the path.

Ben

I think you are correct, Ben. However, from what I gather, "loading" an Octave package is also simply adding it to the path. Carnë explained on Tracker that we don't always want all the installed packages in the path because some conflict with each other, and some overload built-in functions.

My personal belief is that the __unimplemented__ function, which currently
tells us which package we should load, should just load the package and
continue (unless the same function is implemented in multiple packages, in
which case it should list all of those packages and give an error).

That would most closely emulate the Matlab experience, while avoiding the
problems Carnë described.

Cheers,
Lachlan


Removal of autoload will (hopefully) have one big advantage: That people add “pkg load” commands at the beginning of their script files. This will make the script files portable(*) and other users can easily tell that they miss a particular package if the script stops right at the start on their computer.

I find this particularly important in scientific publications when you can easily tell from a script which packages the author has intended to use. Compare this with other languages where you have import-/use-statements for functions that your source code uses (and you need in your namespace).

(*) although it might break compatibility with MATLAB, I don't know.

Oliver



reply via email to

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