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

History Of Ticket 1863645fffffffff

Artifacts Associated With Ticket 1863645fffffffff

  1. Ticket change [2483419afc] (rid 131115) by mpc_janssen on 2008-01-03 23:19:06:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Before starting I will define some terminology (which is similar to terminology in Smalltalk/Ruby/XOTcl and probably more)
      
      Object: everything is an object so classes and instances are also objects
      Class: A class can create instance objects and contains the behavior of the instances
      Instance: An instance is an object create by a class
      Instance method: A method that can be called on a instance of a class and which is defined in the class
      Object method: A method defined on a single object (either a class or an instance)
      Singleton/Self method: Equivalent to Object method
      Class/Static method: A method that is an object method of a class. This is a special case of the Object method if the object is also a class.
      
      Looking at the Tcl API, 
      object methods are defined using self.method
      instance methods are defined using method
      
      Looking at the C-API
      object methods are defined using Tcl_NewMethod.
      instance methods are defined using Tcl_NewClassMethod
      
      notice how the name of the instance method function causes confusion with the definition of Class/Static method as defined above. A Class/Static method would be defined using Tcl_NewMethod on the class object.
      
      To avoid this confusion I think it would be benificial to rename the two commands to:
      Tcl_NewMethod -> Tcl_NewObjectMethod/Tcl_NewSelfMethod
      Tcl_NewClassMethod -> Tcl_NewInstanceMethod
       
      
      
    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: "mpc_janssen"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to:
      Rename method constructors in C-API to avoid confusion
      
    12. type initialized to: "RFE"
  2. Ticket change [0b858c5377] (rid 114005) by mpc_janssen on 2008-01-04 06:28:49:

    1. icomment:
      Logged In: YES 
      user_id=1463011
      Originator: YES
      
      Maybe even (to bring the C-API in line with the Tcl API)
      
      Tcl_NewMethod -> Tcl_NewSelfMethod
      Tcl_NewClassMethod -> Tcl_NewMethod
      
      essentially inverting the role of Tcl_NewMethod from creating object methods to creating instance methods
      
      
    2. login: "mpc_janssen"
    3. mimetype: "text/plain"
    4. username: "mpc_janssen"
  3. Ticket change [28c19e2d74] (rid 88754) by mpc_janssen on 2008-01-04 06:38:31:

    1. icomment:
      Logged In: YES 
      user_id=1463011
      Originator: YES
      
      Also note that this follows the same design decision as for the Tcl API too make the most common operation (defining instance methods) the least verbose name.
      
      
    2. login: "mpc_janssen"
    3. mimetype: "text/plain"
    4. username: "mpc_janssen"
  4. Ticket change [1c0d0d9d6b] (rid 90539) by dkf on 2008-01-06 22:23:59:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      I'm thinking in terms of just converting
        Tcl_NewMethod -> Tcl_NewObjectMethod
      
      
      Note that TclOO doesn't (and can't) support static methods without additional method types. I'm going to leave them to the aftermarket modders... :-)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  5. Ticket change [8fcd7356b5] (rid 120337) by dkf on 2008-04-05 04:53:52:

    1. closedate changed to: "2008-04-04T21:53:52"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Fixed for 0.2
      
      Tcl_NewMethod -> Tcl_NewInstanceMethod
      Tcl_NewClassMethod -> Tcl_NewMethod
      
      Rationale: methods on classes are the most common case, and the case that most people understand "instinctively", and the other kind works on (object) instances. (I'll leave the "class method" concept alone for now; it's not clear to me now how it fits with the fundamental model that TclOO uses.)
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"