|
From: Peter S <pet...@gm...> - 2017-02-14 17:37:31
|
On 14/02/2017, Peter da Silva <pet...@fl...> wrote:
> On 2/14/17, 11:12 AM, "Peter S" <pet...@gm...> wrote:
>> If so, then every array index that is not an expression (that includes
>> every bareword), would need to be quoted...
>
> That would actually make sense. I’ve been kind of on the side of “this will
> have such weird syntax it’s not worth it”, but Sergey’s proposal looks like
> it might be workable.
Both are "weird", in one way or another... Having to quote array
indexes is unusual in the Tcl language.
expr {
"arr(sin)" = sin($x);
"arr(cos)" = cos($x);
"arr(tan)" = tan($x)
}
versus
expr {
arr("sin") = sin($x);
arr("cos") = cos($x);
arr("tan") = tan($x)
}
The difference is - where you put the quotes. Either can work.
|