From: Twylite <tw...@cr...> - 2005-07-06 08:06:00
|
It's clear that the suggested enhancements have the potential to break existing scripts, and I don't believe that this is appropriate for an 8.x change. Donal's suggestion of making ::tcl::list an ensemble seems to be a good start, but how about going one step further? We could add a command that adjusts the Tcl command set, and let the developer choose the appropriate level of compatibility (default is 'fully backwards compatible'). Since 'interp' handles commands exposed to interpreters, it may be an appropriate place for something like this. e.g. # When the interpreter starts, the l* commands are as for 8.4.x, and there # is a ::tcl::list ensemble. interp cmdset transitional # 'list' is now an alias to ::tcl::list, possibly breaking older scripts that # must now be updated. l* commands are still available. interp cmdset updated # 'list' is an alias to ::tcl::list and l* commands are removed from the # interpreter. (A better choice of names for command sets would be appropriate ;) It would also be necessary to decide what happens if a cmdset is changes more than once, i.e. can you go backwards from 'updated' to 'transitional'?) I see value in having the option to remove legacy commands (like l*) and enforce cleaner syntax using the new command set only. Twylite |