Re: Syntax, expressiveness and the beauty of Tcl



Christian Gollwitzer wrote:

I also dislike expr in Tcl, if one has to do lots of math. Especially
that in 99% cases one needs to use additional braces.

Uh oh, what have I done...

Set is OK. I'd
like to have a syntax like

${something}

as an equivalent to [expr {something}]

So one could write

set a ${$b+7}

to get this more compact. However, this not possible in Tcl withou
changing the language...

It should be easier, if the $ is replaced with something else. $ also looks
always as a variable reference to me. Yours would then be to set "a" to the
value of the variable "$b+7", at least that is how it looks to.

But maybe, there is indeed some need to have the possibility to do some more
math expressions "on the fly" inside other statements. I think, nobody
wants something like the {expand}-thing to expand math expressions in the
line, but some simple and short way to have this in the middle of other
statements seems to be useful to me. But I have no idea, how to put this
into the language, without changing it too much (that is without violating
the "command args"-scheme).

Stephan
.