[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36658] syntax change for initialization of gl
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables |
Date: |
Tue, 03 Jul 2012 00:36:11 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 |
Follow-up Comment #15, bug #36658 (project octave):
I've made a patch based on jwe's suggestion which implements a new syntax
(':=') for variable initialization. Try it out and see what you think.
Other changes:
1) I added a new Octave warning ID (Octave:initialization_syntax) so that the
warning about using the old syntax can be suppressed. The warning is on by
default.
2) I updated NEWS with the new behavior and put in a sunset clause of 3.12 for
the current initialization syntax.
3) The Texinfo documentation has been updated. It now seems clearer to me
what is intended by initialization.
4) All of the scripts in the Octave source tree have been updated to use the
new syntax.
Incidentally, I kept the current syntax for assigning the default value of
variables in function headers. This seemed clearer to me since A) it is
reminiscent of existing programming languages like C++ and B) it squares with
my mental model of the variable being "assigned" a value which is then
overriden if the user supplies something different. We could change to use
the same ':=' syntax if we want, but it does generate a lot of warnings
currently.
(file #26140)
_______________________________________________________
Additional Item Attachment:
File name: init_syntax.patch Size:38 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36658>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #36658] acceptance of "global a = b", (continued)
- [Octave-bug-tracker] [bug #36658] acceptance of "global a = b", Torok Levente, 2012/07/02
- [Octave-bug-tracker] [bug #36658] acceptance of "global a = b", Michael Godfrey, 2012/07/02
- [Octave-bug-tracker] [bug #36658] acceptance of "global a = b", Rik, 2012/07/02
- [Octave-bug-tracker] [bug #36658] acceptance of "global a = b", John W. Eaton, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, Rik, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, John W. Eaton, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, John W. Eaton, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, Torok Levente, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, John W. Eaton, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, Torok Levente, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables,
Rik <=
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, John W. Eaton, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, Rik, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, John W. Eaton, 2012/07/02
- [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables, Michael Godfrey, 2012/07/02