octave-maintainers
[Top][All Lists]
Advanced

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

Re: package autoload


From: PhilipNienhuis
Subject: Re: package autoload
Date: Sat, 16 Apr 2016 10:43:37 -0700 (PDT)

Oliver Heimlich wrote
> 
> <snip>
> 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.

That would be great if at the end of that script file the package is
unloaded as well.
I'm not fond of scripts that manipulate environments w/o cleaning up
afterwards (unless such environment changes are intended for regular
operation of SW).

Maybe a sort of "local"switch is required that loads packages only in the
scope of functions and automatically unloads them at function exit.


> 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).

Hmmm, looks a bit like a niche problem to me.
While you might see what packages are used you still can't see which
versions.
IMO it's more a peer reviewer's job to check for completeness of code
snippets.

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/package-autoload-tp4676287p4676335.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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