From: John O. <ou...@el...> - 2003-07-28 22:13:48
|
I have only been skimming the discussion on this topic, but here are a couple of quick comments: - First, I think the overall idea of extending the language syntax to allow substitutions that generate multiple arguments is very interesting. This will make it much easier to program certain constructs. - I don't think there is a "clean" syntactic way to do this without huge backward compatibility issues. To me, both {} and ' are a bit ugly, but the feature seems useful enough to implement in spite of the syntactic clumsiness (either way we go, Tcl gets slightly closer to Perl in wartiness). Arguments over which approach is cleaner don't seem very compelling to me. - Personally, I think {} makes more sense than ' because it's completely backward-compatible, and because it can be extended with additional stuff inside the braces (e.g., {1}$x could mean take the first list element of $x). The ' notation could probably be extended also, but I suspect that the extensions would be syntactically clumsier. - I suspect that this is one of the last opportunities to extend the language syntax, since it's based on a syntactic construct that is currently illegal, and there aren't very many of those. Thus, if you haven't already done so, I'd suggest thinking about how this might evolve (what goes inside the {}) to make sure that we aren't making decisions that we will regret later. For example, {}... is a special case of the general construct {...}..., so it should correspond to the most important/common/general case. -John- |