Re: eg
- Posted by "Mike Nelson" <MichaelANelson at worldnet.att.net> Dec 11, 2004
- 522 views
Matt, A wothy project indeed. A couple of suggestions: 1) Don't allow a global class to inherit from a local class. The purpose of local classes is to provide support for the global class(es) in the file--the user of the file should only see the global classes. Should simplify the scope rules. 2) Method overloading is a concrete b*tch for multi-parameter methods. I tried this for Diamond and gave up. Diamond uses overloading based only on the number of parameters. If further overloading is required, the Diamond programmer must provide it in the method. If you want to have parametype type overloading, I would suggest this method resolution order: considering all methods of the class, both defined in the class and inherited search all methods with the proper number of parameters in the order the methods were defined and the first mathching signature is the method called. In the case of an overridden superclass method, the search order is based on the original method, but the method called is the overriding method. This will assure consistent MRO's among a class and it's subclasses. -- Mike Nelson