"CharlesG" <Ch************@Singularity.co.ukwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi,
Thanks for the info John. However, I would like to base the decision on
some kind of reasoning, which convention is most popular ?
Why do you assume that reasoning is involved in what is, essentially, an
matter of taste?
The only practical reasons I've ever heard are shared by the two platforms.
They both use camel case so that word breaks are clearly visible, at a
glance. thisIsAMethod is more readable than this_is_a_method. However,
ThisIsAMethod and
thisIsAMethod
are pretty much the same.
I think there may be some reasoning around "capitalize the important
things". In that sense, I, personally would vote for method names being
important enough to capitalize. The Java camp thinks that class names are
important enough to capitalize, but not method names. This may be because
Java doesn't use properties, as C# does, so they may be capitalizing method
names at the same level as attribute names (which start with lower case).
That makes a sort of sense.
Being "in the .NET camp", I get to use properties, for which I use a leading
capital letter, the same as I do for methods. This leads me to use leading
capitals on my method names.
Of course, it would be simpler to simply document your reasoning by saying
that "John Saunders said so"... ;-)
John
P.S. I was using IBM Rational Application Developer as a tool to prove that
my WSDL can be consumed by Java. I noticed that it actually warns you
against using leading capital letters in method names. You actually get a
little yellow warning icon saying "that method name is not recommended".