[phobos] Initial Phobos style guide proposal
David Simcha
dsimcha at gmail.com
Thu Mar 31 10:50:00 PDT 2011
On Thu, Mar 31, 2011 at 1:30 PM, Jonathan M Davis <jmdavisProg at gmx.com>
> Overall, I get the impression that most of the style stuff that Phobos devs
> have expressed interest in having rules on are in the public API whereas
> what
> Andrei seems most interested in is the internal coding style. So, I don't
> know
> where we want to go with this. Personally, I think that consistency the
> public
> API is by far the most important thing, but we also don't want a complete
> hodge-podge in the code itself. I'm generally inclined not to get all that
> picky about style rules such as the number of characters per line or the
> exact
> naming of private member variables.
>
Right. The main points I'm trying to make are that even consistency of
internal coding style across modules is IMHO a bikeshed issue. As long as
the public API style is consistent, I fail to see the harm in the style of a
module being dictated by its main author (within reason). I find it
*much*harder to write code in a style I'm not used to than to read
code in a style
I'm not used to, and when maintaining someone else's module I don't mind
adjusting my coding style to match theirs, as long as they do the same when
maintaining my modules.
>
> However, we need to actually get a decent discussion and agreement from the
> Phobos devs as a whole, otherwise it's just a few of us determining it for
> the
> group as a whole, and we could end up with something that only a few of us
> like (or are willing to stick to). Once we've agreed and have a final
> document, hopefully we can pretty much drop the issue and just point people
> to
> the document in the future.
>
>
I'm fine with anything that's not obviously foreign to everyone (e.g. GNU
brace style) and not so Draconian about minutiae that substantial brain
power will be devoted to maintaining proper style rather than writing useful
code. (I once took a class that had programming assignments where the style
guide was so detailed that this was the case. The class was overall very
good but I hated this aspect of it.) I tend to consider details like
whether member variables start with an underscore and whether braces go on
their own line minutiae. IMHO they should just be unspecified.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110331/a1faee8d/attachment.html>
More information about the phobos
mailing list