help-octave
[Top][All Lists]
Advanced

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

Re: Realtime cost of call by value


From: taltman
Subject: Re: Realtime cost of call by value
Date: Fri, 31 Oct 2003 12:21:10 -0800 (PST)

Hi John,

Please find my comments interspersed below:

On Oct 31, 2003 at 2:10pm, John W. Eaton wrote:

jwe >Date: Fri, 31 Oct 2003 14:10:21 -0600
jwe >From: John W. Eaton <address@hidden>
jwe >To: address@hidden
jwe >Cc: address@hidden
jwe >Subject: Re: Realtime cost of call by value

jwe >
jwe >I'm not saying that it is not useful, just that this kind of behavior
jwe >is not consistent with the way that Octave/Matlab is defined.
jwe >
jwe >| It is very clear where this would be useful in Octave: in how arrays,
jwe >| cell arrays, and the soon-to-be-deprecated list types are handled in
jwe >| function calls.
jwe >
jwe >Sure, there's no question that it could be useful.  It would also be
jwe >confusing, and disastrously inconsistent with the way that Matlab
jwe >works.
jwe >
jwe >jwe
jwe >

Well, then this presents itself as a golden opportunity to one-up ole'
Matlab, eh? :-)

Then, let's think of a way that would be consistent with the way
things are, but allow for this improvement. I suggest that the
following can be done:

Instead of throwing "global" all over the place ( and any good
structured programming book will tell you passing everything around in
the global scope is frowned upon ), we can have an environmental
variable that is something like:

nested_lexical_scope = 1;

This turns on nested lexical scoping behavior, as with what is found
in Scheme/Lisp, etc.

The default, for compatibility with MATLAB, would be:

nested_lexical_scope = 0;

This would allow for both to live side-by-side, harmoniously ( I
believe ). ;-)

Thoughts? Comments?

~Tomer



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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