----- Original Message -----
From: Jordi Gutiérrez Hermoso <address@hidden>
To: Sergei Steshenko <address@hidden>
Cc: Octave users list <address@hidden>
Sent: Tuesday, July 10, 2012 10:55 PM
Subject: Re: forcing function execution as a core function or from a certain
package
On 10 July 2012 15:54, Sergei Steshenko <address@hidden> wrote:
So, how about introducing namespaces in Octave (instead of automatic
broadcasting) ?
We can't do that. Matlab conflicts. Matlab does indeed have some sort
of namespacing, but it doesn't really work:
http://abandonmatlab.wordpress.com/2010/05/30/the-mathworks-doesnt-even-know-how-to-look-up-functions-in-their-own-global-namespace/
- Jordi G. H.
The link you gave me does not at all prove Octave developers can't implement
namespaces.
For example, Octave developers can implement namespaces as in Perl, i.e.
Foo::Doo:: ... Hoo::bar
notation is allowed and _demand_ that all Octave packages follow the scheme.
This will be a superset of Matlab language, and traditional Matlab-like code
will still pollute global namespace, but what comes from Octave and its
packages will be clean.
Perl's built-in functions are called without '::' prefix, e.g.
substr
.
And, as in Perl, there should be a mechanism of explicit exporting into global
namespace - sometimes it does make sense, a good example in Perl is POSIX
module: http://perldoc.perl.org/POSIX.html . And not exporting is easy - the
cost is _just_ '()', i.e. just _two_ characters.
Regards,
Sergei.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave