View mode: basic / threaded / horizontal-split · Log in · Help
May 30, 2012
Where is naming convention?
According to http://dlang.org/dstyle.html
"Names formed by joining multiple words should have each word other than 
the first capitalized."

So I thought that this is right:
core.cpuid.fp16c   /// Is FP16C supported
core.cpuid.amdMmx  /// Are AMD extensions to MMX supported?

But in Phobos we have:
std.ascii.isASCII
std.utf.UTFException

More than that UtfException (which looks correct for me) is marked as 
"Scheduled for deprecation" because of incorrect name.

These cases should be explicitly stated in dstyle.html once we 
discovered correct naming in this NG thread (I hope we will).

But for now we still doesn't have naming convention.

-- 
Денис В. Шеломовский
Denis V. Shelomovskij
May 30, 2012
Re: Where is naming convention?
On 30-05-2012 20:50, Denis Shelomovskij wrote:
> According to http://dlang.org/dstyle.html
> "Names formed by joining multiple words should have each word other than
> the first capitalized."
>
> So I thought that this is right:
> core.cpuid.fp16c /// Is FP16C supported
> core.cpuid.amdMmx /// Are AMD extensions to MMX supported?
>
> But in Phobos we have:
> std.ascii.isASCII
> std.utf.UTFException
>
> More than that UtfException (which looks correct for me) is marked as
> "Scheduled for deprecation" because of incorrect name.
>
> These cases should be explicitly stated in dstyle.html once we
> discovered correct naming in this NG thread (I hope we will).
>
> But for now we still doesn't have naming convention.
>

We're moving towards using ASCII rather than Ascii as the naming style 
for abbreviations.

(The style rule about joining words only concerns itself with whole 
words, not abbreviations.)

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
May 30, 2012
Re: Where is naming convention?
30.05.2012 22:53, Alex Rønne Petersen написал:
> We're moving towards using ASCII rather than Ascii as the naming style
> for abbreviations.
>
> (The style rule about joining words only concerns itself with whole
> words, not abbreviations.)
>

Could someone with good English state it in dstyle.html?

-- 
Денис В. Шеломовский
Denis V. Shelomovskij
May 30, 2012
Re: Where is naming convention?
On Wednesday, May 30, 2012 22:59:17 Denis Shelomovskij wrote:
> 30.05.2012 22:53, Alex Rønne Petersen написал:
> > We're moving towards using ASCII rather than Ascii as the naming style
> > for abbreviations.
> > 
> > (The style rule about joining words only concerns itself with whole
> > words, not abbreviations.)
> 
> Could someone with good English state it in dstyle.html?

dstyle.html is horribly out-of-date. This pull request

https://github.com/D-Programming-Language/d-programming-language.org/pull/16

mostly fixes it (it's missing a note of acronyms though), but there are still 
some issues in it that need to be properly discussed and sorted out, and I 
haven't gotten around to sorting that out like I should have.

- Jonathan M Davis
June 02, 2012
Re: Where is naming convention?
30.05.2012 22:53, Alex Rønne Petersen написал:

> We're moving towards using ASCII rather than Ascii as the naming style
> for abbreviations.
>
> (The style rule about joining words only concerns itself with whole
> words, not abbreviations.)

Does it mean that we loose our first latter rule (capitalized for types, 
lowercased for non-types)?

fp16c -> FP16C (property)
amdMmx -> AMDMMX (property)
UtfException -> UTFException (class)
utfExceptionHandler -> UTFExceptionHandler (function)


-- 
Денис В. Шеломовский
Denis V. Shelomovskij
June 02, 2012
Re: Where is naming convention?
On Saturday, June 02, 2012 09:39:06 Denis Shelomovskij wrote:
> 30.05.2012 22:53, Alex Rønne Petersen написал:
> > We're moving towards using ASCII rather than Ascii as the naming style
> > for abbreviations.
> > 
> > (The style rule about joining words only concerns itself with whole
> > words, not abbreviations.)
> 
> Does it mean that we loose our first latter rule (capitalized for types,
> lowercased for non-types)?
> 
> fp16c -> FP16C (property)
> amdMmx -> AMDMMX (property)
> UtfException -> UTFException (class)
> utfExceptionHandler -> UTFExceptionHandler (function)

No. It simply means that all of the letters of an acronym are always the same 
case. So, you'd have

class ASCIIException {}
void funcASCII() {}
int asciiVar;
enum UTFEnum { asciiEnum, utfEnum }

- Jonathan M Davis
June 02, 2012
Re: Where is naming convention?
On Jun 2, 2012 1:54 AM, "Jonathan M Davis" <jmdavisProg@gmx.com> wrote:
> No. It simply means that all of the letters of an acronym are always the
same
> case. So, you'd have
>
> class ASCIIException {}
> void funcASCII() {}
> int asciiVar;
> enum UTFEnum { asciiEnum, utfEnum }

Oh, good solution, I could never decide how to do it in my code.
June 02, 2012
Re: Where is naming convention?
02.06.2012 9:53, Jonathan M Davis написал:
> No. It simply means that all of the letters of an acronym are always the same
> case.

Good!

-- 
Денис В. Шеломовский
Denis V. Shelomovskij
June 02, 2012
Re: Where is naming convention?
On Wednesday, 30 May 2012 at 18:53:26 UTC, Alex Rønne Petersen 
wrote:
> We're moving towards using ASCII rather than Ascii as the 
> naming style for abbreviations.

I don't agree with this style.  Camel case employs capitalization 
as a word delineation cue in lieu of spaces.  Incorporating 
acronyms as-is defeats this.  Also anything with adjacent 
acronyms will be even harder to parse.

Please reconsider.
June 02, 2012
Re: Where is naming convention?
On Saturday, 2 June 2012 at 21:01:03 UTC, John Belmonte wrote:
> On Wednesday, 30 May 2012 at 18:53:26 UTC, Alex Rønne Petersen 
> wrote:
>> We're moving towards using ASCII rather than Ascii as the 
>> naming style for abbreviations.
>
> I don't agree with this style.  Camel case employs 
> capitalization as a word delineation cue in lieu of spaces.  
> Incorporating acronyms as-is defeats this.  Also anything with 
> adjacent acronyms will be even harder to parse.
>
> Please reconsider.

I agree, like, dump camelcase altogether! :p
« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home