|
From: Jan N. <jan...@gm...> - 2025-11-17 17:45:05
|
Op ma 17 nov 2025 om 18:17 schreef Ashok:
> Further, it also leads to incompatibilities with Tcl 9.
>
> Tcl 9:
>
> % lindex {a b c} {}
> a b c
>
> TIP 615:
> % lindex {a b c} {}
> (empty string)
Hm. Did you actually try that, or did you derive it from the TIP?
I'm getting this with the TIP #615 branch:
$ tclsh9.1
% lindex {a b c} {}
a b c
So there is no incompatibility at all.
Explanation: 'lindex' doesn't have an index as the first argument,
its argument is a list of indexes. I'l clarify this in the TIP.
This also means, the remainder of your argumentation on
consistency doesn't make much sense to me.
> % lsearch -index [list {}] {{a 1} {b 0} {c 2}} 0
> Empty string cannot be compiled as index
That's clearly a bug. I'll have a look at it. Thanks!
Jan Nijtmans
|