[Top][All Lists]

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

[Octave-bug-tracker] [bug #55667] Conflict between package namespace and

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55667] Conflict between package namespace and function name
Date: Thu, 7 Feb 2019 11:28:58 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #3, bug #55667 (project octave):

Another issue is that "foo" and "foo()" may both be function calls.  Would it
help if, in order to further index a function call, you had to write
foo().index instead of just foo.index?  At least then you would not have to
look up "foo" as a function when evaluating "foo.index".  Or would this not
eliminate all possible conflicts?

>From the point of view of the implementation, I'd be glad to eliminate the
possibility of further indexing function calls because it would greatly
simplify the indexing code in the Octave interpreter.

This change would cause no trouble for people using Octave to run code
developed for Matlab.  But it would probably cause a lot of pain for many
Octave users who have come to rely on this feature.

Oh, I just tried

dir.name    ## works, dir is called with nargout == 1
dir().name  ## fails, because when called this way,
            ## dir is called with nargout == 0 and in
            ## that case it doesn't return a struct.


Is this behavior really what we want?


Reply to this item at:


  Message sent via Savannah

reply via email to

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