Re: Syntax, expressiveness and the beauty of Tcl



Stephan Kuhagen wrote:
2+2 -> x

As far as I know, this came from POP-11. I've never seen it elsewhere.
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 ].

--
.-. .-. .---. .---. .-..-. |Experts in Linux: www.WildOpenSource.com
| |__ / | \| |-< | |-< > / |"Making the bazaar more commonplace"
`----'`-^-'`-'`-'`-'`-' `-' |Check out my new novel: "Cloud Realm":
http://www.smith-house.org:8000|<this+/books/Larry_Smith/CloudRealm.html
.



Relevant Pages

  • Re: idiom Ive not seen before
    ... So elements.sort_byis shorthand for sorting the elements by ... How would you pass the *args in?? ... They don't seem to fit on either side ...
    (comp.lang.ruby)
  • Re: Why should I get a 1080p?
    ... 1080P as a shorthand name for 1920x1080 sounds logical enough. ... Scan conversion. ... remaining ones are rescaled to fit the screen. ... Same as with qmost ...
    (alt.tv.tech.hdtv)