Protected
Daniel Bonniot <[email protected]> Mon, 05 Sep 2005 14:40:09 +0200
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
>>Not at the moment. How would it be defined? (keep in mind that >>multi-methods do not "belong" to classes) > > > In Java, protected methods in a class can be accessed in classes that inherit > from that class, but not from methods outside said class. > > In Nice, private methods in a class can be accessed in classes that inherit > from that class, but only if both classes are defined in the same file. Sorry to be picky, but this is important to this question: "in classes" is not relevant because we are speaking of multi-methods, which can dispatch on all their arguments and occur at the package level, outside classes. Java's definition of "protected" is very much tied to the mono-method model, so it is hard to say directly how this can be translated in Nice. What would help is to give a realistic but hopefully short example (or a few) of the situation, so we can think how that can be handled in the multi-method model. How is this handled in other multi-method based languages? Cheers, Daniel ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf