Learning D - first steps and best practices

Jonathan M Davis jmdavisProg at gmx.com
Tue Oct 1 20:28:53 PDT 2013


On Tuesday, October 01, 2013 21:32:05 qznc wrote:
> On Sunday, 29 September 2013 at 07:49:21 UTC, Jonathan M Davis
> 
> wrote:
> > I confess that I don't understand why so many people are
> > fixated on having a
> > standard style, particularly when it's very, very clear that
> > most everyone
> > disagrees on what counts as good style. What little we have in
> > terms of official
> > style guidlelines for D can be found here:
> > http//:dlang.org/dstyle.html
> 
> I think nowadays programmers expect their language to come with
> more opinion and best practices. In contrast, the C++ world is
> too fragmented for consistent advice.
> 
> I believe, the best solution would be to include an
> auto-formatter (like go fmt), so people can simply reformat the
> code before and after editing.

Yuck. I want to be able to format my code the way that I like. I really don't 
like the idea of any kind of standard formatting, and I hate it when I'm 
forced to work on projects where I'm forced to format the code in a particular 
way. I'd much, much rather be able to format the code however I like. I've 
worked on several projects where the rule of thumb is to try and keep the 
formatting with a file consistent but otherwise let folks format their code how 
they like, and that's far more pleasant IMHO. Having a formatter just 
encourages forcing some sort of standard format, and it only works for the 
folks who really like that format and the folks who don't care about 
formatting.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list