and I meant to emphasize, an acronym uses the opposite capitalization of
the previous letter, not word, as demonstrated by packetToXMLconverter. The
key is defining word boundaries.

Sincerely,
Josh
On Aug 3, 2013 10:54 AM, "Josh Leverette" <[email protected]> wrote:

> What about a new style altogether?
>
> "Toggle mode caps."
>
> thisIsANormalClass
> thisHasAnXMLacronymInIt
> someXMLcool
> xmlHTTPawesomeClass
> int
> float
> infinityFloat
> fastInt
> packetToXMLconverter
> httpBrowser
> arc
> gc
> fastGC
> gcSlow
>
> Lowercase to start the class name, followed by an uppercase first letter
> for each subsequent word. When acronyms are present, the case applies to
> the whole acronym, lower or upper, and the following word uses the opposite
> case, whether for the first letter or the whole acronym.
>
> This allows for visual distinction of each word with ease, and would
> provide a look that uniquely identifies Rust code from any other language.
> The rules are simple enough once explained, so there would be no guessing
> as to the capitalization. The built-in, atomic, types are already following
> this capitalization convention, and if you stare at it long enough each
> day, I'm sure it will garner its own aesthetic attraction, since beauty is
> in the eye of the beholder. and you'd be beholding it quite a lot.
>
> Just an idea.
>
> Sincerely,
> Josh
> On Aug 3, 2013 10:42 AM, "Felipe Oliveira Carvalho" <[email protected]>
> wrote:
>
>> .Net style, but using ALL CAPS when the whole name is the acronym.
>>
>> Examples:
>>
>> GC<Foo>
>> MyGc<Bar>
>> ARC<int>
>> XML
>> XmlNode
>> HTTP
>> XmlHttpRequest
>>
>> Reasoning:
>>
>> 1. All caps acronyms are a well known typographical convention.
>>
>> 2. UpperCamelCase has a constraint: word boundaries are recognized by
>> case change. This constraint makes the concatenation of two acronyms
>> unclear. That's why you end up with names like XMLHttpRequest() while using
>> the impossible (IMO) Java style.
>>
>> My suggestion allows us to use the nice typographical typographical
>> convention (1) and have a plan to avoid the problems caused by
>> UpperCamelCase limitation (2).
>>
>> I guess this style would minimize the changes needed in the code base.
>>
>> --
>> Felipe Carvalho
>> On Aug 2, 2013 10:29 PM, "Patrick Walton" <[email protected]> wrote:
>>
>>> Hi everyone,
>>>
>>> Brendan Eich emailed me expressing a preference for `GC<>` over `Gc<>`.
>>> I think now is as good a time as any to have the bikeshedding debate :)
>>>
>>> I've noticed two styles for acronyms in type names: Java style
>>> (HTTPServer) versus .NET style (HttpServer). Currently we are usually using
>>> .NET style, but inconsistently (e.g. ARC). We never really decided.
>>>
>>> Here are a few examples of types in each style:
>>>
>>> * Java style: GC<Foo>, ARC<int>, SimpleHTTPServer, XMLHTTPRequest.
>>>
>>> * .NET style: Gc<Foo>, Arc<int>, SimpleHttpServer, XmlHttpRequest.
>>>
>>> I slightly prefer Java style myself because I think "GC" looks better
>>> than "Gc", because Web APIs use Java style, and because Python does (e.g.
>>> SimpleHTTPServer) and in general we've been following PEP 8. But I don't
>>> feel strongly on this issue.
>>>
>>> Thoughts/straw poll?
>>>
>>> Patrick
>>> ______________________________**_________________
>>> Rust-dev mailing list
>>> [email protected]
>>> https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev>
>>>
>>
>> _______________________________________________
>> Rust-dev mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/rust-dev
>>
>>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to