dfmt options

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 15 13:34:07 PDT 2015


On Sunday, March 15, 2015 03:02:53 Walter Bright via Digitalmars-d wrote:
> Haven't we all got better things to do than argue about formatting styles?

Sure, like we have better things than to argue about vim vs emacs. But I
wouldn't want to be forced to use emacs (or micro-emacs) just because that's
what you like to do. The same goes with formatting code in a specific way.
It's not something that I want to argue over, but it's not something that I
want pushed upon me either.

Sometimes, you just have to suck it up and format code the way that someone
else wants, because it's not your project, and the formatting guidelines for
the project aren't lax enough to let you code how you'd like to, but I hate
it when I have to format code in ways that I don't like. It's like walking
around with a pebble in your shoe. It may not stop you from getting any work
done, but it's a constant point of pain.

Certainly, if dfmt isn't configurable, then for any D project that I have
the opportunity to work on, I'd be fighting against using it, because
there's no way that it would be formatting the code the way that I'd like. I
expect that that battle is a lost cause with regards to Phobos and the other
official source, but I'd actively discourage its use in any code that I'm
involved with aside from that so that I could avoid having to deal with the
formatting rules that it would be enforcing.

Having a configurable formatting tool doesn't fix that problem, because an
unpleasant coding style can obviously still be required even without a
formatting tool, but at least if it's configurable, it becomes possible to
tweak a coding style and get closer to a desirable formatting style while
still using the official formatting tool instead of being forced to use the
same, unwanted style everywhere just because folks want to use dfmt.

- Jonathan M Davis



More information about the Digitalmars-d mailing list