www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Where is naming convention?

reply Denis Shelomovskij <verylonglogin.reg gmail.com> writes:
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
parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
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
next sibling parent reply Denis Shelomovskij <verylonglogin.reg gmail.com> writes:
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
parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
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
May 30 2012
prev sibling next sibling parent reply Denis Shelomovskij <verylonglogin.reg gmail.com> writes:
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
Jun 01 2012
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, June 02, 2012 09:39:06 Denis Shelomovskij wrote:
 30.05.2012 22:53, Alex R=C3=B8nne Petersen =D0=BD=D0=B0=D0=BF=D0=B8=D1=
=81=D0=B0=D0=BB:
 We're moving towards using ASCII rather than Ascii as the naming st=
yle
 for abbreviations.
=20
 (The style rule about joining words only concerns itself with whole=
 words, not abbreviations.)
=20 Does it mean that we loose our first latter rule (capitalized for typ=
es,
 lowercased for non-types)?
=20
 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 th= e same=20 case. So, you'd have class ASCIIException {} void funcASCII() {} int asciiVar; enum UTFEnum { asciiEnum, utfEnum } - Jonathan M Davis
Jun 01 2012
parent Denis Shelomovskij <verylonglogin.reg gmail.com> writes:
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
Jun 02 2012
prev sibling parent Kevin Cox <kevincox.ca gmail.com> writes:
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.
Jun 02 2012
prev sibling parent reply "John Belmonte" <john neggie.net> writes:
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.
Jun 02 2012
parent reply "q66" <quaker66 gmail.com> writes:
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
Jun 02 2012
parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 03-06-2012 01:55, q66 wrote:
 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
It's not going to change *now*... this is way too late. -- Alex Rønne Petersen alex lycus.org http://lycus.org
Jun 02 2012