On Sunday, December 9, 2018 at 10:57:26 PM UTC+1, Gerald Lester wrote:
> Well, not sure why you would bother with regexp, lindex would be easier.
>
> It all depends on how "real benefit" is defined -- one thing something
> like Advent of Code does is show ways to use the language, thus in this
> case there was a "real benefit" to Erik.
When I read "production system", I think of robustness and performance. I like the character of Tcl a lot, but hacking a puzzle does not generate production code. In this regard, it does not matter which of the Tcl parsers (script, list, [in another context] expr) are or are not used.
The question should have been: What is the benefit of using a Tcl built-in *parser* rather than string processing (regexp, scan, lsearch, ...) in *production code*?
Btw, in this special case (simple input, all space separated) one could even just [source] the input file, which is indeed very cool!