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

History Of Ticket 1959486fffffffff

Artifacts Associated With Ticket 1959486fffffffff

  1. Ticket change [cd1ab4b0e4] (rid 95825) by dgp on 2008-05-07 12:49:51:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Please address the comments in
      
      http://aspn.activestate.com/ASPN/Mail/Message/tcl-core/3316529
      
      Too low on network connect and power
      to rephrase again here at the moment.
      
    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: "dgp"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "[oo::define] and self.*"
    12. type initialized to: "RFE"
  2. Ticket change [9290f47cfa] (rid 120780) by dkf on 2008-05-08 22:20:25:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      From the link...
      
      My reaction re-reading the TIP is that this complexity appears to be the 
      result of forcing everything into a single command, [oo::define]:
      
         oo::define $objectOrClass $script
      
      The commands in $script do different things depending on whether or not 
      $objectOrClass is a class, and then there are special self.* provisions 
      to force a class value of $objectOrClass to be treated as a plain object 
      value of $objectOrClass.  (Since every class is also an object).
      
      Seems to my uneducated perspective it would be clearer to have two 
      defining commands:
      
         oo::objdef $object $script1
      
         oo::classdef $class $script2
      
      And have the commands in $script1 treat $object as an object and the 
      commands in $script2 treat $class as a class (and oo::classdef error in 
      the case that $class is not a class).
      
      It's not like anyone can use the proposed [oo::define] effectively 
      without knowing whether or not the first argument they pass is a class 
      or not.  So if they have that knowledge, there's no additional burden in 
      having them choose between [objdef] and [classdef].  I think?
      
      I'm guessing there's some deep reason either in the theory or in the 
      implementation why things haven't gone that way, and I don't yet 
      appreciate it, but that's my reaction trying to navigate the 
      [oo::define] spec.
      
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [9626ff36eb] (rid 106276) by dkf on 2008-05-08 22:20:46:

    1. priority changed to: "9 Immediate"
  4. Ticket change [ee3ff8b5ce] (rid 104050) by dkf on 2008-05-08 22:31:52:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      My response...
      
      That's a really good suggestion actually. I might go for oo::objdefine instead of oo::objdef and leave oo::define for classes, but the overhead's quite low either way.
      
      Now, why don't I remember seeing this before? :-(
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  5. Ticket change [1655329bb9] (rid 124701) by kennykb on 2008-05-09 04:49:45:

    1. icomment:
      Logged In: YES 
      user_id=99768
      Originator: NO
      
      I like oo::objdef and oo::define.  oo::define is the usual thing to
      do in a class-based (rather than traits-based) system, so it makes
      sense to have it be the one with the unqualified name.
      
      And it gets rid of the self.* stuff.
      
      If we can do it quickly, make it so!
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  6. Ticket change [1f4b73a2ac] (rid 91126) by dkf on 2008-05-09 06:09:05:

    1. closedate changed to: "2008-05-08T23:09:05"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Implemented it! Will form part of 0.3.
      
      (I'm glad really, the self. prefixes had been bothering me for a while, but when we did the initial design they were the best idea we could come up with. But splitting oo::define really is much better.)
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Accepted"
    7. status changed to: "Closed"
    8. username: "dkf"
  7. Ticket change [3b1b531437] (rid 112670) by das on 2008-05-09 07:28:18:

    1. icomment:
      Logged In: YES 
      user_id=90580
      Originator: NO
      
      one disadvantage of this solution is that you now can no longer use the self. commands in a oo::class create {} block e.g. to define a class method, you have to use a separate oo::objdef now, splitting the class definition among several commands...
      Worth it to get rid of the self. ugliness IMO, but if possible it might be nice to have a way to somehow integrate the objdef bits of a class definition into the oo::class block, e.g. with a self {} subblock or something of that nature ?
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  8. Ticket change [0b24967420] (rid 113935) by dkf on 2008-05-11 17:11:27:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      That's another good suggestion. Implemented.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [50e9f0ac8e] (rid 126055) by dgp on 2008-05-13 02:17:37:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Thanks for considering and acting on this.
      I'm ok with what you've done.
      
      FWIW, reading my own message 18 months later,
      today I think I would suggest an "ensemble"
      solution:
      
        oo::define object $object $script1
        oo::define class $class $script2
      
      Make of that what you will.
      
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"