Sujet : Re: can this work?
De : et99 (at) *nospam* rocketship1.me (et99)
Groupes : comp.lang.tclDate : 27. Mar 2025, 19:24:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vs455e$rhhh$1@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
On 3/26/2025 5:35 AM, Alan Grunwald wrote:
>
FWIW, I remember when I first started to use [expr {$a eq "b"}] if took me *AGES* to get the syntax right. To be fair to [expr], its error message (if you omit the double-quotes) is pretty specific, but I still found it a struggle to get the syntax right.
The lesson I took from this was to stop writing
set i foo
and to start writing
set i "foo"
but the temptation to save a couple of keystrokes is still strong :-)
I too have taken to always use the double quotes, first it better indicates my intent, but also my text editor highlights all "strings" in red so it's much easier to see them. This provides my incentive :)
While I was certainly nitpicking, it does show how difficult it can be to describe a computer language in a language like English. For years I thought it had to be in ""'s because that's how one normally writes strings. Then one day I read [expr] (for the n-teenth time) and finally realized one could also use braces, but one of the two is required. That's when the light-bulb finally glowed for me :)