As part of general clean-up of Phobos, I propose the following:<br><br>1. We update the %(&#$# style guide to not say this.<br><br>2. Anywhere where the OLD_SCHOOL style is used, for example:<br><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">enum MyEnum {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> /// Has DDoc.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> FOO,</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> /// Has DDoc</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> BAR</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br>we should simply change to:<br><br><span style="font-family: courier new,monospace;">enum MyEnum {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> /// Has DDoc</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> foo,</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> /// Has DDoc</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> bar,</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // Undocumented, for compatibility only.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> FOO = foo,</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // Undocumented, for compatibility only.</span><br> BAR = bar<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br>
<br>I'll be doing this in my dstats library and I think we should gradually do it in Phobos as a "fixing broken windows" when already working on a module.<br><br>Also, do we want the first letter to be or not be capitalized? MyEnum.Foo or MyEnum.foo? There's inconsistency within Phobos about this, too.<br>
<br><br><br><div class="gmail_quote">On Fri, Aug 20, 2010 at 3:11 PM, Simen Endsjų Haugen <span dir="ltr"><<a href="mailto:simen.endsjo@pandavre.com">simen.endsjo@pandavre.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
On 20.08.2010 21:06, Andrei Alexandrescu wrote:<br>
(...)<div class="im"><br>
<blockquote type="cite">
<br>
At any rate, please no all-caps constants :o).
<br>
<br>
</blockquote>
</div><a href="http://www.digitalmars.com/d/2.0/dstyle.html:" target="_blank">http://www.digitalmars.com/d/2.0/dstyle.html:</a><br>
<br>
(...)Submissions to Phobos and other official D source code will
follow these guidelines.(...)
<dl>
<dt>Enum member names</dt>
<dd>Are in all caps.</dd>
</dl>
</div>
<br>_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br></blockquote></div><br>