Overview
| Artifact ID: | 2483419afc960a6deb89bf89e6d04f8989ab580b |
|---|---|
| Ticket: | 1863645fffffffffffffffffffffffffffffffff
Rename method constructors in C-API to avoid confusion |
| User & Date: | mpc_janssen on 2008-01-03 23:19:06 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed 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
- foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "mpc_janssen"
- subsystem changed to: "35. TclOO Package"
- title changed to:
Rename method constructors in C-API to avoid confusion
- type changed to: "RFE"