Artifacts Associated With Ticket 1880941fff
Ticket change [4ce9c88c10] (rid 126973) by coldstore on 2008-01-28 03:42:22:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
[set y 1; lassign a x y; set y] returns "", I think it should return 1. Commonly [lassign] is used to assign a list of values to variables, as (for example) a way of interpreting multiple return values. In the case that there's no value, it's useful to be able to assign a default. The proposed behavior, that unmatched variables be left alone, permits one to implement defaulting behavior, example: lassign $defaults x y z lassign [function] x y z Where the current behavior requires a fairly tedious series of [if] if one needs to distinguish between defaulted values and "".
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "coldstore"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "lassign behavior on excess arguments"
- type initialized to: "RFE"
Ticket change [8b3254303e] (rid 127521) by dgp on 2008-01-28 21:53:30:
- icomment:
Logged In: YES user_id=80530 Originator: NO see also 1671880
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [bba21ad01c] (rid 129520) by dkf on 2008-01-28 22:02:08:
- icomment:
Logged In: YES user_id=79902 Originator: NO The proposed change is more expensive to implement (needs more elaborate bytecode generation).
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [efafe97caa] (rid 109041) by dkf on 2008-01-28 22:02:09:
- assignee changed to: "dgp"
Ticket change [76316efb47] (rid 105533) by coldstore on 2008-01-29 00:06:06:
- icomment:
Logged In: YES user_id=19214 Originator: YES I find it counterintuitive that (as dkf claims) not touching a variable leads to more bytecode than initializing it to "", but it may well be the case.
- login: "coldstore"
- mimetype: "text/plain"
- username: "coldstore"
- icomment:
Ticket change [da12c438da] (rid 107711) by dkf on 2008-01-29 06:55:31:
- icomment:
Logged In: YES user_id=79902 Originator: NO It's because [lindex {1 2 3} 4] is {} (not an error) and in the no-assign case I'd need to generate extra code to detect when the list is exhausted and stop assigning. Right now, I generate jump-free code... - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment: