Skip to content
Tcl Source Code History Of Ticket fd2d126f23
Login

History Of Ticket fd2d126f23

Artifacts Associated With Ticket fd2d126f23

  1. Ticket change [271a7aaeaf] (rid 141789) by anonymous on 2015-05-16 00:53:50:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      This proc
         proc oneFunction {a {b 1} c} {puts "$a $b $c"}
      
      doesn't guive an error. It's accepted by the interpreter. I think all the optional arguments should be at the end.
      
    5. is_private initialized to: "0"
    6. login: "anonymous"
    7. priority initialized to: "5 Medium"
    8. private_contact initialized to: "1c4b6cdb98c9dfc4d1e74018f3f4efa00ad217e2"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "anonymous"
    13. subsystem initialized to: "18. Commands M-Z"
    14. title initialized to: "Wrong proc doesn't guives an error"
    15. type initialized to: "Bug"
  2. Ticket change [408fa42a3c] (rid 141791) by dkf on 2015-05-16 05:52:37:

    1. assignee changed to: "msofer"
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. subsystem changed to: "22. [proc] and [uplevel]"
  3. Ticket change [aee10e2ae8] (rid 141806) by ferrieux on 2015-05-16 11:41:33:

    1. icomment:
      The reason it is accepted, is that {b 1} is a valid arg name.
      I admit it would make sense to forbid whitespace in arg names except for default ones (end of list), but after decades without the rule there's a (small) risk of compat breakage. Maybe for 9.0 ?
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
  4. Ticket change [3ce20b9761] (rid 141811) by dkf on 2015-05-17 11:06:38:

    1. icomment:
      No, each formal argument has always been a list. It's just that <tt>proc</tt> has simply never checked for this failure mode. At some point we might get around to making optionals-in-the-middle work. But for now, it's a (really) low priority, especially as it is a performance-sensitive area.<p>Making this be a declaration-time error would be reasonable. The only concern would be how much of an impact on existing (non-working) scripts this would have.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"