[phobos] Initial Phobos style guide proposal

Jacob Carlborg doob at me.com
Thu Mar 31 08:13:21 PDT 2011


-- 
/Jacob Carlborg

On 31 mar 2011, at 16:18, David Simcha wrote:

> 
> 
> 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.

I sugest people start using an editor that handles the *'s automatically.

> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110331/3896dfca/attachment-0001.html>


More information about the phobos mailing list