Re: Syntax, expressiveness and the beauty of Tcl
- From: Uwe Klein <uwe_klein_habertwedt@xxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 18:48:38 +0100
Eckhard Lehmann wrote:
Christian Gollwitzer wrote:guess why HP Calculators never gained popularity with the masses.
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
uwe, letting his gaze wander over to his treasured first calculator:
a still working HP 21
.
- References:
- Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Christian Gollwitzer
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Eckhard Lehmann
- Syntax, expressiveness and the beauty of Tcl
- Prev by Date: Re: Tcl/Tk Books updated for 8.5
- Next by Date: Re: Handling asynchronous hardware events
- Previous by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Next by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Index(es):