Exceptional coding style

Jonathan M Davis jmdavisProg at gmx.com
Thu Jan 17 23:18:18 PST 2013


On Friday, January 18, 2013 07:45:34 Mehrdad wrote:
> On Friday, 18 January 2013 at 05:41:00 UTC, Artur Skawina wrote:
> > This is one of the reasons why automatic code formatting is
> > such a bad idea.
> > 
> > artur
> 
> In what language? In C# it's actually a fantastic idea.

In _any_ language. Inevitably, the formatter ends up totally mangling at least 
some of the lines. In my experience, any attempt to be super strict with the 
formatting rules (as an automatic code formatter must be) results in ugly 
code. A basic set of formatting rules helps the code be consistent and look 
good, but there are always corner cases where the rules must be bent or broken 
in order to make the code appropriately legible. And it requires having a 
human do the formatting to get that kind of flexibility.

- Jonathan M Davis


More information about the Digitalmars-d mailing list