Learning D - first steps and best practices
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Tue Oct 1 18:19:19 PDT 2013
On Tuesday, 1 October 2013 at 19:32:08 UTC, 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.
That may be, but we are not working with C++, python, Go, etc
programmers. We are dealing with D programmers, and they can't
agree on formatting. There are also many cases which require
breaking rules for readability.
For me, if the program didn't format brackets on the same line I
wouldn't use it. If you start making things configurable, may as
well improve indent's support for D.
More information about the Digitalmars-d-learn
mailing list