Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen <nospam@xxxxxxxxxx>
- Date: Tue, 31 Oct 2006 07:05:53 +0100
Larry Smith wrote:
Stephan Kuhagen wrote:
2+2 -> x
As far as I know, this came from POP-11.
I never heard about that. What is it? Or do you mean PDP-11?
I've never seen it elsewhere.
"->" is one character on the Casio pocket calculator, if I remember right.
If you're interested, it was this one:
http://rechner.hs.abcbtx.de/Gall_Casio/index.php?i=132
with it's manual here:
http://www.casiotechno.com/download/manual/FX-8000G.pdf
Mine still does work, and wow, I had 1917 kind of Bytes for storing my
programs! (Kind of because every token was one "Byte"... strange)
And, as I've noted before, it's a good fit with Tcl syntax _iff_ you
use "->" as a synonym for ";" with the proviso that the scanner will
generate the appropriate "set" after scanning ahead to eol or the next
";" to pick up the variable name. That is, the above is simply
understood by the scanner to be shorthand for "set x [ expr 2+2 ]",
the same way it now understands $x is shorthand for [ set x ].
But this would be a bigger change to the scanner? Looks to me, if this
likely would have very bad performance.
Regards
Stephan
.
- References:
- Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- From: suchenwi
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Donal K. Fellows
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Larry Smith
- Syntax, expressiveness and the beauty of Tcl
- Prev by Date: Re: write binary file with struct in tcl
- Next by Date: Re: Syntax, expressiveness and the beauty of Tcl
- Previous by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Next by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Index(es):