Thread overview | |||||
---|---|---|---|---|---|
|
January 15, 2019 Style: On capital letters in names | ||||
---|---|---|---|---|
| ||||
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. |
January 15, 2019 Re: Style: On capital letters in names | ||||
---|---|---|---|---|
| ||||
Posted in reply to Victor Porton | 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 |
January 15, 2019 Re: Style: On capital letters in names | ||||
---|---|---|---|---|
| ||||
Posted in reply to Victor Porton | 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.
|
Copyright © 1999-2021 by the D Language Foundation