On Tuesday, January 15, 2013 15:50:10 Walter Bright wrote: > Continuing in the vein of the Exceptional coding style thread, D needs (and > has needed for a long time) a utility that will reformat source code. > > One use of it would be to run as a filter on all of the Druntime and Phobos > source code before checkin.
Honestly, I would hate to have anything like this run on druntime or Phobos. We've specifically avoided enforcing exact formatting rules in the style guide and instead have focused on the API. In addition, code formatters always end up mangling code. Sure, some of the code looks fine, but other parts of it inevitably look hideous, because the formatter can never deal with special cases well enough. You just can't make the formatting rules flexible enough, and sometimes, you just plain have to break formatting guidelines in order to make code legible. I have no problem with anyone writing a code formatter, but I sure don't want to deal with a code base that uses one. > This could make great use of the current projects to implement a D lexer and > parser in D. I really need to get back to this, but life is so hectic... - Jonathan M Davis
