class proposals - BFDL challenge
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Right now we have four major proposals in the area of fixing str_ call_ and/or adding classes. 1) My str_ call_ proposal which has the major prototype object that holds the instance methods and any factory methods that are not overidden and an attribute of that object, the attrProxy_ object that holds any factory methods that are overriden by instance methods. This is not really a dual-namespace model but it has the advantages of one. This is the only proposal that allows normal Python-like directed method calling. This proposal requires an interpreter hack. 2) Serge and Greg's class proposal that has a full dual namespace with class methods in the outer class object and instance methods in the inner object. This proposal makes referring to class methods easy but requires sepcial syntax for instance methods and directed method calling. 3) Paul's non-class proposal that "fixes" the str_ call_ problem like my proposal but requires no extra method-holding object for a prototype. This proposal fixes the str_ and call_ problems only by adding a flag attribute to a prototype and changing the Object version of str_ and call_. 4) My class 3.1 proposal is to add a class keyword and work with any of the proposals above. It would only add design-by-contract restrictions such as not allowing the class object to be instantiated, only allow the instance to inherit from the class, make the class immutable, etc. I personally am in favor of using whatever solution makes the least change to the prototypes while allowing an optional class design-by-contract to be used. To me this is the combination of 3 and 4. In order to speed up this process I'm going to provide a BFDL challenge. I'm going to claim that we do not need dual namespaces for anything more than fixing call_ and str_. Therefore number 3 is sufficeint. If you see a flaw in my logic or know of another need than call_ and str_ then speak up now. If you know of another dual-namespace need than call_ and str_please provide an example. If no one can meet this challenge then we will use proposal 3. Item 4 will still be up for argument.