[phobos] Initial Phobos style guide proposal
David Simcha
dsimcha at gmail.com
Thu Mar 31 07:18:44 PDT 2011
On Thu, Mar 31, 2011 at 9:29 AM, Steve Schveighoffer <schveiguy at yahoo.com>wrote:
> One thing I've noticed about std.container, and it makes it very hard for
> me to read: Putting all ddoc comments with no indentation. In particular,
> I have a very hard time seeing where a class or struct ends. Andrei, there
> must be a good reason for you to do this, can you explain that? I'd really
> prefer that the comments are put at the same indentation as the code being
> commented.
>
> Also, can we standardize the comment style, at least for ddoc comments?
> I've seen a few different styles in phobos. My favorite is:
>
> /**
> * comment
> */
>
> or
>
> /++
> + comment
> +/
>
> I do not like this:
>
> /**
> comment
> */
>
I've switched the other way recently. The problem with your example is that
it's a huge pain when you go to modify the comment and need to keep all
those extra *'s in sync. Furthermore, if you're using an editor with syntax
highlighting, I don't find distinguishing comments and code to be even the
slightest bit of a problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110331/6e0fe9d1/attachment-0001.html>
More information about the phobos
mailing list