Skip to content
Tcl Source Code History Of Ticket 3483088
Login

History Of Ticket 3483088

Artifacts Associated With Ticket 3483088

  1. Ticket change [a0e22dffbf] (rid 96886) by coldstore on 2012-02-02 06:58:57:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      [tailcall next] complains spuriously that 'next may only be called from inside a method' even when it is.  See attached.
      
      I think I have another problem related to this, where [tailcall next] is complaining spuriously 'wrong # args: should be "next"', but will see how this one pans out.
      
    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: "10. Objects"
    11. title initialized to: "[tailcall next] doesn't work ... should it?"
    12. type initialized to: "Bug"
  2. Ticket change [1d793c346a] (rid 90816) by coldstore on 2012-02-02 13:58:58:

    1. icomment:
      
      
      File Added - 434661: tailcall.tcl
      
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  3. Ticket change [4dcc9efb2c] (rid 127118) by coldstore on 2012-02-02 14:12:57:

    1. icomment:
      
      
      File Added - 434663: tailcall.tcl
      
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  4. Ticket change [cd98922dc5] (rid 95920) by coldstore on 2012-02-02 14:13:13:

    1. icomment:
      
      
      File Deleted - 434663: 
      
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  5. Ticket change [0fab140b38] (rid 94829) by coldstore on 2012-02-02 14:13:41:

    1. icomment:
      
      
      File Deleted - 434661: 
      
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  6. Add attachment "tailcall.tcl" [fae61a2ff6] (rid 91965) by coldstore on 2012-02-02 14:13:57.

  7. Ticket change [3e2933222c] (rid 121218) by coldstore on 2012-02-02 14:13:57:

    1. icomment:
      
      
      File Added - 434664: tailcall.tcl
      
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  8. Ticket change [4995d20128] (rid 100079) by coldstore on 2012-02-02 14:32:55:

    1. icomment:
      I guess, by the time the [next] is called, the [tailcall] has already taken effect, and somehow the context is no longer that of an object.  Shouldn't it be, though?
      
      
    2. login: "coldstore"
    3. mimetype: "text/plain"
    4. username: "coldstore"
  9. Ticket change [ca65eefcd6] (rid 95339) by dkf on 2012-02-10 21:15:25:

    1. closedate changed to: "2012-02-10T14:15:25"
    2. closer changed to: "dkf"
    3. foundin changed to: "obsolete: 8.6b2"
    4. icomment:
      
      
      allow_comments - 1
      
      [tailcall foo] is like [return [uplevel foo]] apart from some quoting issues and the context in which [foo] is resolved. (But there's only one [next], so the resolution will be consistent.) Thus, [tailcall next] only works at all when the _caller_ of the object can do a [next], which means that it needs to be done inside a method called from inside a method. I'm guessing that that's something you don't need. :-) It's complaining about the wrong # args because that's what the caller's next method implementation wants (I guess).
      
      So... it works, but not in the way you would reasonably want. (Remember, [next] effectively does an [uplevel] inside itself so methods don't need to know about potential subclasses overriding them. It also _requires_ that the caller be an object method body context, since it uses that to know what is going on.) To do anything else would require teaching [tailcall] to know specially about [next] and vice versa, which would be rather disgustingly nasty.
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Works For Me"
    8. status changed to: "Closed"
    9. username: "dkf"