Skip to content
Tcl Source Code History Of Ticket 1880941fffffffff
Login

History Of Ticket 1880941fffffffff

Artifacts Associated With Ticket 1880941fffffffff

  1. Ticket change [4ce9c88c10] (rid 126973) by coldstore on 2008-01-28 03:42:22:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. 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 "".
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "coldstore"
    10. subsystem initialized to: "16. Commands A-H"
    11. title initialized to: "lassign behavior on excess arguments"
    12. type initialized to: "RFE"
  2. Ticket change [8b3254303e] (rid 127521) by dgp on 2008-01-28 21:53:30:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      see also 1671880
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [bba21ad01c] (rid 129520) by dkf on 2008-01-28 22:02:08:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      The proposed change is more expensive to implement (needs more elaborate bytecode generation).
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [efafe97caa] (rid 109041) by dkf on 2008-01-28 22:02:09:

    1. assignee changed to: "dgp"
  5. Ticket change [76316efb47] (rid 105533) by coldstore on 2008-01-29 00:06:06:

    1. 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.
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  6. Ticket change [da12c438da] (rid 107711) by dkf on 2008-01-29 06:55:31:

    1. 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...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"