Xstream naming convension

6 messages Options
Embed this post
Permalink
legege

Xstream naming convension

Reply Threaded More More options
Print post
Permalink
I would suggest to rename XstreamRepresentation to XStreamRepresentation (capital S), to follow the naming of the XStream library itself. This would also affect the setXstream() method, which should become setXStream().

What's your thought?

Thanks
jlouvel

Re: Xstream naming convension

Reply Threaded More More options
Print post
Permalink
Hi there,

I agree this would look nicer, but it frequently happens that acronyms
are put next to another. In those cases, it seems more readable to
systematically use camel case. Instead of HTTPURLConnection, we would
use HttpUrlConnection (JDK uses HttpURLConnection which looks inconsistent).

It is also a matter of taste... I just prefer readability of camel case,
even for acronyms, but other naming schemes would be fine I guess. At
least we try to stay consistent inside the Restlet project.

Hope it makes sense!

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com



legege a écrit :
> I would suggest to rename XstreamRepresentation to XStreamRepresentation
> (capital S), to follow the naming of the XStream library itself. This would
> also affect the setXstream() method, which should become setXStream().
>
> What's your thought?
>
> Thanks

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413019
Tim Peierls

Re: Xstream naming convension

Reply Threaded More More options
Print post
Permalink
And see Item 56 of Effective Java, 2nd edition, where Josh Bloch writes:
There is little consensus as to whether acronyms should be uppercase or have only their first letter capitalized. While uppercase may be more common, a strong argument can be made in favor of capitalizing only the first letter: even if multiple acronyms occur back-to back, you can still tell where one word starts and the next word ends. Which class name would you rather see, HTTPURL or HttpUrl?

--tim

On Fri, Oct 30, 2009 at 10:50 AM, Jerome Louvel <[hidden email]> wrote:
Hi there,

I agree this would look nicer, but it frequently happens that acronyms
are put next to another. In those cases, it seems more readable to
systematically use camel case. Instead of HTTPURLConnection, we would
use HttpUrlConnection (JDK uses HttpURLConnection which looks inconsistent).

It is also a matter of taste... I just prefer readability of camel case,
even for acronyms, but other naming schemes would be fine I guess. At
least we try to stay consistent inside the Restlet project.

Hope it makes sense!

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com



legege a écrit :
> I would suggest to rename XstreamRepresentation to XStreamRepresentation
> (capital S), to follow the naming of the XStream library itself. This would
> also affect the setXstream() method, which should become setXStream().
>
> What's your thought?
>
> Thanks

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413019

Ben R Vesco

Re: Xstream naming convension

Reply Threaded More More options
Print post
Permalink
To throw in my $0.02, also which would you rather type? I think it is
much easier to type strict camel case as opposed to all cap acronyms.
Sometimes hitting caps lock is just too much trouble (especially if
there are only two letters capped) and it gets way more painful when
those two consecutive capital letters occur on opposite hands. It
really slows down the typing of the code...

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413095
legege

Re: Xstream naming convension

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tim Peierls
But XStream stands for XmlStream. If the library was called XMLStream, I would definitely choose XmlStream; similar to your examples. But this case is different. If we would like to respect the camel case naming convention, XStream would make more sense, doesn't it?



Tim Peierls wrote:
And see Item 56 of Effective Java, 2nd edition, where Josh Bloch writes:
>
> There is little consensus as to whether acronyms should be uppercase or
> have only their first letter capitalized. While uppercase may be more
> common, a strong argument can be made in favor of capitalizing only the
> first letter: even if multiple acronyms occur back-to back, you can still
> tell where one word starts and the next word ends. Which class name would
> you rather see, HTTPURL or HttpUrl?


--tim

On Fri, Oct 30, 2009 at 10:50 AM, Jerome Louvel
<jerome.louvel@noelios.com>wrote:

> Hi there,
>
> I agree this would look nicer, but it frequently happens that acronyms
> are put next to another. In those cases, it seems more readable to
> systematically use camel case. Instead of HTTPURLConnection, we would
> use HttpUrlConnection (JDK uses HttpURLConnection which looks
> inconsistent).
>
> It is also a matter of taste... I just prefer readability of camel case,
> even for acronyms, but other naming schemes would be fine I guess. At
> least we try to stay consistent inside the Restlet project.
>
> Hope it makes sense!
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
>
> legege a écrit :
> > I would suggest to rename XstreamRepresentation to XStreamRepresentation
> > (capital S), to follow the naming of the XStream library itself. This
> would
> > also affect the setXstream() method, which should become setXStream().
> >
> > What's your thought?
> >
> > Thanks
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413019
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413053
StephanKoo

Re: Xstream naming convension

Reply Threaded More More options
Print post
Permalink
I agree

Stehan

legege schrieb:

> But XStream stands for XmlStream. If the library was called XMLStream, I
> would definitely choose XmlStream; similar to your examples. But this case
> is different. If we would like to respect the camel case naming convention,
> XStream would make more sense, doesn't it?
>
>
>
>
> Tim Peierls wrote:
>  
>> And see Item 56 of Effective Java, 2nd edition, where Josh Bloch writes:
>>    
>>> There is little consensus as to whether acronyms should be uppercase or
>>> have only their first letter capitalized. While uppercase may be more
>>> common, a strong argument can be made in favor of capitalizing only the
>>> first letter: even if multiple acronyms occur back-to back, you can still
>>> tell where one word starts and the next word ends. Which class name would
>>> you rather see, HTTPURL or HttpUrl?
>>>      
>> --tim

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413109