Exceptional coding style
Jonathan M Davis
jmdavisProg at gmx.com
Fri Jan 18 00:22:17 PST 2013
On Friday, January 18, 2013 09:12:26 Mehrdad wrote:
> Have you /actually/ tried this in Visual C#?
>
> Visual C# doesn't use "heuristics" to do format your code... it's
> not like C++ where everything is ambiguous.
>
> I suggest you give it a try and let the auto-formatter format
> your code to see what I mean.
Heuristics aren't the issue. The problem is that formatters inevitably have a
strict set of rules about how code is supposed to be laid out, and they don't
allow you to break them. There are times when it's just plain ugly to follow
the formatting rules exactly, and the rules need to be bent or broken in order
to make the code clean and legible. I have never seen a code formatter which
could do anything like that. Certainly, the more powerful and flexible the code
formatter is in terms of the rules that you can give it, the fewer such
problems you run into, but I'd never expect a formatter to be able to avoid
the problem entirely.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list