Re: Syntax, expressiveness and the beauty of Tcl
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 10:29:43 +0000
Stephan Kuhagen wrote:
Maybe, this extension should be really part of [expr], so we can write
expr {x=some_expr}
instead of
set x [expr {some_expr}]
That's TIP#282, which is probably not going to be in 8.5 after all. That
is because it introduces a new concept, an LValue, which [expr]essions
didn't have before, and we'd like to have more alpha-cycle time to
evaluate it's effects.
You can hack your way around this by defining a [set] function, perhaps
like this:
interp alias {} ::tcl::mathfunc::set {} ::set
which you would then use like this:
expr { set("x", 1+2+3) }
Donal.
.
- Follow-Ups:
- Re: Syntax, expressiveness and the beauty of Tcl
- From: suchenwi
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- 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
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Syntax, expressiveness and the beauty of Tcl
- Prev by Date: Re: write binary file with struct in tcl
- Next by Date: Re: strings in TcL
- Previous by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Next by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Index(es):