Skip to content
Tcl Source Code History Of Ticket 558299ffffffffff
Login

History Of Ticket 558299ffffffffff

Artifacts Associated With Ticket 558299ffffffffff

  1. Ticket change [582b88eca7] (rid 117757) by lvirden on 2002-05-20 14:46:02:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I would like to request a new feature where by the
      only valid use of a proc argument called 'args' is as
      the last argument of the proc.  It need not of course
      be present at all - but if it is present, the change
      would require args to be the last argument.
      
      In this way, changes to proc definitions by non-savvy
      tcl programmers do not break the Tcl behavior of
      treating args special if it is the last argument. 
      Also, use of args as a 'normal' proc argument is
      prevented - otherwise, tcl programmers seeing the
      variable may expect a list of remaining arguments when
      in fact they are only getting one argument.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "lvirden"
    9. subsystem initialized to: "22. [proc] and [uplevel]"
    10. title initialized to: "restrict use of proc argument named args"
    11. type initialized to: "RFE"
  2. Ticket change [797e570706] (rid 90142) by dkf on 2002-05-20 21:52:38:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Alternative that I thought of:
      
      Make args always magical and for it to suck up all args not
      used elsewhere (particularly thinking about handling of
      fixed suffixes on commands that take options.)  This would
      make implementing something that looks like, say, [lsearch]
      easier as you could declare it as [proc foo {args searchTerm
      list} {...}]
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [68f8b075a5] (rid 103162) by vincentdarley on 2002-05-20 22:24:53:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      I like Donal's suggestion a lot.  Allowing 'args' as a 
      first argument would make it much easier to implement any 
      command that looks like 'cmd ?opts? blah blah'.  Given that 
      commands which look like that are the 'Tcl-way', I think it 
      would be a great idea.
      
      That would mean we probably want to throw an error for 
      multiple use of 'args'  (i.e. proc {args foo args} {...} is 
      an error, but then again _any_ multiple use of the same 
      parameter is most likely an error).
      
      My only worry: anyone who has written code using 'args' as 
      a non-final parameter has a reasonable chance that the code 
      might break when this change is made.  This represents a 
      mild backwards compatibility issue, but likely only for 
      code written by Tcl-beginners.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  4. Ticket change [9d626e072c] (rid 96297) by pspjuth on 2007-02-22 14:42:33:

    1. icomment:
      Logged In: YES 
      user_id=98900
      Originator: NO
      
      See also TIP 288
      
      
      
    2. login: "pspjuth"
    3. mimetype: "text/plain"
    4. username: "pspjuth"
  5. Ticket change [f5b4b2a02f] (rid 130162) by lvirden on 2007-02-22 19:35:36:

    1. icomment:
      Logged In: YES 
      user_id=15949
      Originator: YES
      
      hey, I don't mind the idea of args always being special, I guess. It would allow intentional use as Donal described to be done. 
      
      The original request arose when someone had come along and, not knowing the specialness of args, added an argument after it in a proc, resulting in the code not working.
      
      The newly proposed behavior of always being magic is a potential incompatibility, but not any more than my original request...
      
      
    2. login: "lvirden"
    3. mimetype: "text/plain"
    4. username: "lvirden"
  6. Ticket change [c73e2d252a] (rid 261540) by serhiy.storchaka on 2026-11-13 11:18:44:

    1. closedate changed to: "2461357.9713335303"
    2. closer changed to: "serhiy.storchaka"
    3. icomment:
      The direction agreed on here, making args special anywhere, was TIP 288. That TIP was rejected in 2022, and nobody proposed the incompatible restriction separately.
      
    4. login: "serhiy.storchaka"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Rejected"
    7. status changed to: "Closed"