From Newsgroup: comp.lang.tcl
On 17/10/2025 23:23, et99 wrote:
I've implemented a working prototype of TIP 672 - the $(expression)
syntax for Tcl.
Instead of:
-a set result [expr {$a + $b * $c}]
-a puts "Total: [expr {$sum + $tax}]"
You can now write:
-a set result $($a + $b * $c)
-a puts "Total: $($sum + $tax)"
...
Thoughts? Does anyone see issues I haven't considered?
One biggy: It's another irregularity making programming, which is
difficult, even more so. It doesn't take long for them to compose
together into development gridlock.
Tcl has so far been a bastion of syntactically NotRubbish. Please try to
keep it so for all our sakes.
If it's just a matter of typing '[expr ' instead of '$(' then don't do
it without super special reasons, and if the expression syntax has lots
of pitfalls it would be a grave error to give it the prime syntactic
position.
Because of the workload to do useful things correctly, the Tcl
maintainers are already simplifying Tcl with otherwise needless breaking changes. If you make it harder for them and also harder for users to
understand Tcl and predict what and how to do things from documentation
then it'll just devalue Tcl.
--
Tristan Wibberley
The message body is Copyright (C) 2025 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
--- Synchronet 3.21a-Linux NewsLink 1.2