www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Coding style on dlang.org

On Sat, Aug 23, 2014 at 03:01:59PM +0000, monarch_dodra via Digitalmars-d wrote:
 On Saturday, 23 August 2014 at 14:52:45 UTC, H. S. Teoh via Digitalmars-d
 wrote:
I notice that the coding style used for code examples on dlang.org
isn't always consistent, and they generally differ from Phobos
examples.  Should we adopt Phobos style for all code examples on
dlang.org?


 Do you have any specific examples? I'd assume the code is mostly old.
 I'd reject any pull that doesn't adhere to Phobos style, even if it's
 just ddoc'ed examples.

Plenty. Just a few random examples: http://dlang.org/abi.html http://dlang.org/arrays.html http://dlang.org/attributes.html http://dlang.org/class.html http://dlang.org/index.html (!) The "violations" are mainly Egyptian braces, 2-space indentation, and a few missing closing braces. On Sat, Aug 23, 2014 at 03:41:03PM +0000, w0rp via Digitalmars-d wrote: [...]
 I think I'd recommend submitting pull requests to fix the examples to
 match current conventions, or making edits to wiki pages.

I'm working on a dlang.org PR to fix the code examples. Still debating whether to submit them as separate PR's, or a single giant PR (esp. since I'm moving this week so won't have much time to work on this!). T -- I am a consultant. My job is to make your job redundant. -- Mr Tom
Aug 23 2014