Ideally a name should tell you two things:
Function
Implementation
IFoo tells you nothing about function, but tells you a lot about
implementation (it's an interface).
AbstractDieselEngine tells you A) it's a diesel engine and B) it's
abstract.
DieselEngine tells you A) it's a diesel engine and B) it's concrete
(but only if your convention is that "naked" names indicate concreteness.
If we're looking for a way to determine behavior (function)
differences based on names, I don't think prefix or suffix conventions are
going to do the job. These sorts of conventions are, imho, good at
describing implementation, but near useless at describing function.
That's a whole other question e.g. how to assign functionally
meaningful names.
--- Pat
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kent Tong
Sent: Monday, April 25, 2005 6:32 PM
To: [email protected]
Subject: Re: Naming intefaces and abstract classes
Patrick Casey <patcasey <at> adelphia.net> writes:
> > What if later you have a DieselEngine class (probably
> > implementing AbstractDieselEngine), how can you tell
> > the semantic difference between the two?
>
> I'm not sure I understand what you're asking here.
I'm saying if we have both DieselEngine and AbstractDieselEngine,
how can we tell their behavioral difference from their names?
For example, we have both Map and HashMap, from their names we
know that HashMap is using hashing to implement the map. So
the behavioral difference between Map and HashMap is pretty
clear.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]