Talk:ClarityOfAccessModifiers
From APIDesign
Comments on ClarityOfAccessModifiers <comments />
Contents |
Winheim Raulsh said ...
Anonymous said ...
Please don't ever apply for a Java developer job at my company. You have such an eccentric, strange view of Java and its Object Oriented design points, that I would have to tear out my hair when reviewing your code. *sigh*
--Anonymous 14:24, 26 March 2009 (CET)
Rob Grainger said ...
The language Eiffel offers a much better set of accessibility restrictions. A set of members is introduced with the 'exports' keyword.
'exports' alone is equivalent to 'exports ANY', rougly equivalent to 'public'.
Otherwise 'exports classname' exports to class 'classname' and descendants, if classname is the current class, this is 'protected'. Otherwise, more like a C++ friend.
Eiffel also introduces other mechanisms to help design resuable libraries that have yet to make the mainstream, inspite of pre-dating many OO languages.
--Rob Grainger 17:53, 26 March 2009 (CET)
Arno Nyhm said ...
please show not only a bad example for the Factorial but also a good solution for this implementation.
--Arno Nyhm 10:42, 27 March 2009 (CET)
I have extended EliminateFuzzyModifers with real world example to satisfy your request. Enjoy!
--JaroslavTulach 11:14, 4 April 2009 (UTC)
In Delphi, all methods are assumed to be final. This means that protected final is just protected, public final is just public, and protected abstract is protected abstract. This way methods are final by default, and you don't have this problem; making everything abstract by default has its tradeoffs. Either things are more extensible (and you can shoot yourself in the foot), or things are more restricted and less flexible.
--Winheim Raulsh 22:52, 25 March 2009 (CET)
It seems to me that those who preach OO reuse prefer flexibility. While those who did OO reuse for few years rather see a bit of restrictions to avoid future maintenance madness.
Nothing against flexibility, Delphi approach is flexible enough. But it generates less errors when used in cluelessness mode - a designer needs to think to create a virtual method. That is the important moment. So in fact, the only restriction I am relly advocating is less error prone default.
--JaroslavTulach 13:54, 26 March 2009 (UTC)