|
|
|
|
|
by luser001
4929 days ago
|
|
> I do not like this sort of behavior in my dynamic type system. Why? [Other than for performance reasons] I keep repeating this point in every Tcl thread. Tcl was meant to be used to enable command line shells for programs written in C. Btw, being able to treat a list as a dict has been useful to me. I (developer) write a routine to be used by a non-developer, who may not be a great programmer. The list notation is easy in Tcl. I can just tell them to make a list with keys and values alternating. And for a one-time conversion cost, I get to use it as a dict. Also works the other way around: I can return a dict. And if a Blub user is processing it, he's free to ignore my documentation that it's a dict and process it as a list (again for a one-time cost). YMMV. |
|
Because it becomes very hard to reason with what you have at hand, and in my experience the "helpful" conversions, rather than actually help, mostly hides errors and bugs in the code and delays there effect, making them much harder to diagnose than a stricter handling.