[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.
- package autoload, Olaf Till, 2016/04/15
- Re: package autoload, Juan Pablo Carbajal, 2016/04/15
- Re: package autoload, Ben Abbott, 2016/04/15
- Re: package autoload, LachlanA, 2016/04/15
- Re: package autoload, oheim, 2016/04/15
- Re: package autoload, Olaf Till, 2016/04/15
- Re: package autoload, LachlanA, 2016/04/16
- Re: package autoload, Olaf Till, 2016/04/16
- Re: package autoload,
PhilipNienhuis <=
- Re: package autoload, Oliver Heimlich, 2016/04/16
- Re: package autoload, PhilipNienhuis, 2016/04/17
- Re: package autoload, Ben Abbott, 2016/04/15
- Re: package autoload, Juan Pablo Carbajal, 2016/04/15