Overview
| Artifact ID: | e4a4a016df671279dd0aaa56990500863f8370aa |
|---|---|
| Ticket: | 219378ffffffffffffffffffffffffffffffffff
[string range] to take index list |
| User & Date: | dkf on 2000-12-06 17:36:06 |
Changes
- icomment:
OK, I think I perhaps ought to explain myself. Firstly, it is trivially easy to work around this using [foreach], though this is a messy solution, admittedly. Secondly, the optimal current work-around may well be this: eval [linsert $list_of_two_indices 0 string range $string] (It is optimal since it guarantees that there is no real double evaluation of any values, even though it lacks a lot on the "optimality of representation" front too.) Thirdly, a full solution ought to address the fact that there are many places in Tcl where this sort of conversion of lists to multiple arguments would be useful, and that a more general solution (a la the {expand}$list discussion of a few months back) would be a far more efficient use of people's time than a horde of special fixes scattered throughout Tcl, Tk and all the various extensions. If nothing else, the maintenance overhead is much lower. (Not that I'm advocating a particular syntactic construct here - just the general concept.) Perhaps I ought to go back over that discussion and see if a suitable TIP can be culled from it...? Only problem with doing this is that it results in a shed-load of work falling on me from a great height... :^) - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"