Re: Syntax, expressiveness and the beauty of Tcl



Eckhard Lehmann wrote:
Christian Gollwitzer wrote:


set x [expr $a+$b]

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. Set is OK. I'd
like to have a syntax like

[...]

set a ${$b+7}


That all looks very weird and complex. What about a simple and strict
polish notation, like in LISP:

proc + {a b} {expr {$a + $b}}
proc - {a b} {expr {$a - $b}}
proc * {a b} {expr {$a * $b}}
proc / {a b} {expr {$a / $b}}

set res [+ [* 7 8] [- 8 9]]
55
guess why HP Calculators never gained popularity with the masses.

uwe, letting his gaze wander over to his treasured first calculator:

a still working HP 21
.