Markus Kuppe wrote:
Brian Vosburgh wrote:
* Can we get rid of the "I" prefix on all our non-EMF interfaces? I
don't see the benefit; but maybe someone can explain it to me.
Thanks.
Brian
using the I as a prefix for interfaces is an eclipse convention. see
http://wiki.eclipse.org/index.php/Naming_Conventions#Classes_and_Interfaces
I think we should go along with it.
Hmmmm. I tend to like conventions, but this one is widely
ignored (esp. when using EMF) and its rationale, "This
convention aids code readability by making interface names more readily
recognizable.", is mystifying. I've never
encountered a piece of code or a bug or a design discussion that was
confused because the parties involved could not quickly whether a type
was an interface or a class. Never mind that the main benefit of this
type of convention is that it be more widely followed than it currently
is. Currently, even if the "I-" were helpful, you still need to figure
out whether any non-"I"-prefixed type is an interface or class....
I guess I was asking for more insight as to the reasons we need to know
whether a particular type is an interface or class. My experience is
that I use interfaces more than the implementations (i.e. interfaces
are used for field declarations, return types, method arguments,
temporary variable declarations; while implementations are used only at
object construction, which should be as localized as possible, and for
performance tunings). So I want the interfaces to be the more readable
of the two. I also dislike the EMF "-Impl" convention - it usually
hints at a poor design - but I dislike it less than the "I-" convention
because I don't have to read it or type it as often. :-)
So, that's my reasoning behind thinking the "I-" convention is not so
helpful. Now I would love to hear the reasoning behind its being
helpful, i.e. why is it important that interfaces be "more readily
recognizable". Even if we don't change our hodgepodge of naming
conventions, I still want to know; because, if it's convincing enough,
I think I'm open to conversion. :-)
Brian
|