June 17, 2013
On Monday, June 17, 2013 17:13:07 Joseph Rushton Wakeling wrote:
> So, have I missed something in a style guide in a different location, or have these rules simply been adopted by custom without making it into official guidelines? If the latter, should I make a pull request for the website? :-)

What's on the website is correct. Those are all the rules that are required for Phobos as a whole, and if you were creating a new module, you wouldn't have had any such issues. The problem is that we try and keep the style within modules consistent beyond that, and Andrei in particular is very picky about that with regards to std.algorithm and std.range or any other module that he's the primary author of. So, things like whether there should be a space after an if (which I personally hate, but Andrei loves) or whether full-bracing is required are a per-module thing. Just look at what the module you're editing is doing with regards to those things when you create a pull request.

- Jonathan M Davis
June 17, 2013
On 06/17/2013 05:48 PM, Jonathan M Davis wrote:
> What's on the website is correct. Those are all the rules that are required for Phobos as a whole, and if you were creating a new module, you wouldn't have had any such issues. The problem is that we try and keep the style within modules consistent beyond that, and Andrei in particular is very picky about that with regards to std.algorithm and std.range or any other module that he's the primary author of. So, things like whether there should be a space after an if (which I personally hate, but Andrei loves) or whether full-bracing is required are a per-module thing. Just look at what the module you're editing is doing with regards to those things when you create a pull request.

Ahh, OK.  That's fine; I don't at all mind Andrei being picky, just wanted to check if I was missing any documentation.

The other reason was that I noticed that these local rules actually aren't uniform even within std.random (the module in question).  I'd happily correct that but wanted to be sure of the rules first!