D Style Guide (was Re: Second Round CURL Wrapper Review )
Justin C Calvarese
jccalvarese at gmail.com
Sat Dec 17 07:46:44 PST 2011
== Quote from jdrewsen (jdrewsen at nospam.com)'s article
> On Thursday, 15 December 2011 at 07:46:56 UTC, Jonathan M Davis
> wrote:
...
> > I'd argue that the acronyms should be in all caps if
> > camelcasing would require that the first letter of the acronym
> > be capitalized and all lower case if camelcasing would require
> > that the first letter of the acronym be lower case. We're not
> > completely consistent in how we using acronyms in names in
> > Phobos, but I believe that we primarily follow that rule when
> > putting them in symbol names. So, for instance, it would be
> > HTTP, FTP, and SMTP rather than Http, Ftp, and Smtp.
> I like Http better as personal taste. But if HTTP is preferred
> then I'll do that. Actually I think I will make a pull request to
> extend the dlang.org/dstyle.html doc with and example that we can
> point to when someone asks about styling. I've spend too much
> time restyling because there is no such style doc already and
> people are complaining about style in reviews anyway.
(I'm sorry if this comes across as a repost, but I guess I don't know how to post using the mailing list.)
I absolutely agree that the "D Style" page should be revised and extended to reflect the current standards
that new Phobos modules are expected to adhere to.
I found an open pull request that indicated a past effort in this regard:
https://github.com/D-Programming-Language/d-programming-language.org/pull/16
(I thought that another document was also floating around that was a proposed new "Style Guide for Phobos",
but I don't recall who authored it and I don't remember where it was located.)
jcc7
More information about the Digitalmars-d
mailing list