Artifacts Associated With Ticket 218127
Ticket change [83d54d713f] (rid 117442) by nobody on 2000-10-26 00:53:27:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1986 RFE Version: 8.0.5 SubmitDate: '1999-05-04' LastModified: '2000-01-12' Severity: LOW Status: Closed Submitter: pat ChangedBy: hobbs OS: All OSVersion: NA Machine: NA FixedDate: '2000-10-25' FixedInVersion: NA ClosedDate: '2000-01-12' Name: Alexandre FERRIEUX DesiredBehavior: Idea: interpreting whitespace in a proc name as a subcommand override. Example: # Today we handle subcommands this way: proc a {sub args} { switch -- $sub { b {...} c {...} default {error "a: Unknown subcommand '$sub'"} } } # With 'space commands' we'd do instead: proc a {sub args} {error "a: Unknown subcommand '$sub'"} proc "a b" args {...} proc "a c" args {...} Detailed mechanism: when evaluating a command line "a b c d e", Tcl would first look for a proc named "a b c d e", then "a b c d", ..., then "a". Notice that this can be made fairly efficient, by using the base proc as an anchor (basename) where we'd store a linked list of special cases, ordered by decreasing length; e.g. if "a b c" and "a b c d e" are overridden, the structure linked with procedure "a" would contain the list {{4 "b c d e"} {2 "b c"}}. The comparisons with the actual parameter list could be done on strings, or lists, or hash values. Notice that for the 99% of procs with no subcommand override, this list would be empty, hence no performance drag. Benefit: this solves the major/minor way in a way that's very natural in Tcl. While the concept of major/minor is important, this is an incompatible, and somewhat odd was of achieving such behavior. We'd rather explore more natural command extension possibilities. -- 01/12/2000 hobbs - foundin initialized to: "final: 8.0.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "81. Bundled Packages"
- title initialized to: "'space commands' to solve major/minor"
- type initialized to: "RFE"
Ticket change [8291cbf80a] (rid 117259) by welch on 2000-10-26 08:15:55:
- closedate changed to: "2000-10-26T01:15:55"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [4000995f70] (rid 121555) by dgp on 2001-04-05 07:17:53:
- foundin changed to: "None"
- status changed to: "Open"
- subsystem changed to: "None"
Ticket change [54c7c7617b] (rid 94008) by dgp on 2001-04-05 07:18:50:
- closedate changed to: "2001-04-05T00:18:50"
- closer changed to: "dgp"
- status changed to: "Closed"
- subsystem changed to: "45. Parsing and Eval"