Re: Syntax, expressiveness and the beauty of Tcl



Eckhard Lehmann wrote:
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

Every operator is a command as well and it is compatible with the rest
of Tcl (although it will be even less familiar to the majority of
programmers)

TIP #174 (http://tip.tcl.tk/174) is being voted on this week.
It provides exactly the Cambridge Polish (not RPN, the "reverse"
in RPN indicates that the operator comes *last*) notation that
you request.

--
73 de ke9tv/2, Kevin
forth love if honk else forth learn then
.



Relevant Pages

  • Re: Syntax, expressiveness and the beauty of Tcl
    ... polish notation, like in LISP: ... of Tcl (although it will be even less familiar to the majority of ... It provides exactly the Cambridge Polish (not RPN, ...
    (comp.lang.tcl)
  • Re: I dont like expr
    ... lisplike polish notation for commands but the expr remains algebraec, ... Why doesn't tcl adopt a complete polish notation? ... You can write your own polish version of expr, ... The factor isn't the new pop culture crowd your refering ...
    (comp.lang.tcl)
  • Re: TIP #174: Math Operators as Commands
    ... > list relating to TIP 174, I was struck by a thought this morning. ... > I don't know that I want Tcl to look more and more like Scheme. ... I'm somewhat used to reverse polish notation and could easily ...
    (comp.lang.tcl)
  • Re: I dont like expr
    ... It's quite elegant. ... lisplike polish notation for commands but the expr remains algebraec, ... Why doesn't tcl adopt a complete polish notation? ... I have used HP rpn calculators for a loooong time. ...
    (comp.lang.tcl)
  • Re: I dont like expr
    ... Michael Schlenker schreef: ... lisplike polish notation for commands but the expr remains algebraec, ... Why doesn't tcl adopt a complete polish notation? ... You can write your own polish version of expr, ...
    (comp.lang.tcl)