On 14/12/13 03:17, Manu wrote:
I don't care which, I just like consistency. And it seemed to me that the largest body of D code as maintained by the official community should probably define such a standard, but clearly that boat has long sailed, so I guess it doesn't matter.
For quite a long time I wrote D code using essentially the same coding style I'd adopted for C/C++: K&R style braces, tabs for indent/spaces for alignment, probably one or two other things I can't recall now. (Basically apart from the strict indentation rules, I swiped it from the Linux Kernel guidelines, on the grounds that this was probably A Good Thing:-)
Then I started contributing to Phobos and realized that I'd have to adapt an alternative style for those contributions, and I didn't like it much; and I went so far as to use different editors for my personal D work and for Phobos work.
Then when I came to the point of writing stuff of my own for immediate public distribution I realized that I was being silly and that if I wanted to write stuff that was usable for everyone, I might as well just use the standard D style guide for everything.
And now I do, and to be honest I can't work out why I was so keen to hang on to my previous style (which I'd probably still use for C/C++ where it's more idiomatic).
It's just a style, and as long as it's simple and easy to follow and to implement automatically in an editor, the details don't really matter. It just matters that we have a style and it would be a good thing if publicly-shared repositories all made use of it.
