www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Style: On capital letters in names

reply Victor Porton <porton narod.ru> writes:
It seems that https://dlang.org/dstyle.html misses the question 
how to name function which gets an URI (URI is an abbr written in 
capital letters):

getURI or getUri?

Please answer this my question and also update the style guide.
Jan 15
next sibling parent Johannes Loher <johannes.loher fg4f.de> writes:
On Tuesday, 15 January 2019 at 22:01:21 UTC, Victor Porton wrote:
 It seems that https://dlang.org/dstyle.html misses the question 
 how to name function which gets an URI (URI is an abbr written 
 in capital letters):

 getURI or getUri?

 Please answer this my question and also update the style guide.
See https://dlang.org/dstyle.html#naming_acronyms Acronyms When acronyms are used in symbol names, all letters in the acronym should have the same case. So, if the first letter in the acronym is lowercase, then all of the letters in the acronym are lowercase, and if the first letter in the acronym is uppercase, then all of the letters in the acronym are uppercase. This clearly states it should be „getURI“, because the „U“ needs to be a capital letter because of camelCase
Jan 15
prev sibling parent Neia Neutuladh <neia ikeran.org> writes:
On Tue, 15 Jan 2019 22:01:21 +0000, Victor Porton wrote:
 It seems that https://dlang.org/dstyle.html misses the question how to
 name function which gets an URI (URI is an abbr written in capital
 letters):
 
 getURI or getUri?
getURI, by the examples of getUDAs and parseJSON.
Jan 15