help-octave
[Top][All Lists]
Advanced

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

Re: octave function name resolution (how conflict is handled)


From: Jordi Gutiérrez Hermoso
Subject: Re: octave function name resolution (how conflict is handled)
Date: Sun, 26 Aug 2012 10:37:43 -0400

On 25 August 2012 23:13, Peng Yu <address@hidden> wrote:

> However, practically, there must be cases where two toolboxes use the
> same file/function name, in which case, something has to be done
> besides renaming.

Nope, nothing is done. It's an unholy mess:

    
http://abandonmatlab.wordpress.com/2010/05/30/the-mathworks-doesnt-even-know-how-to-look-up-functions-in-their-own-global-namespace/

> (BTW, does matlab or octave native toolboxs have any
> name conflicts?)

Yes, there is an example in the link above for Matlab. In Octave, a
notorious example is the NaN package which *deliberately* shadows core
functions.

> Do you have some examples (i.e., with some working
> code) on how this is solved given the limitations of the current name
> resolution rule? Thanks!

There isn't a good solution. Use prefixes for your own names and be
wary of possible namespace conflicts when using other people's code.
My own recommendation is to avoid using Octave or Matlab if you're
savvy enough to understand namespace conflicts.

- Jordi G. H.


reply via email to

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