Code Style

Vladimir Panteleev thecybershadow at gmail.com
Fri Jun 15 14:46:57 PDT 2007


On Fri, 15 Jun 2007 22:27:40 +0300, Robert Fraser <fraserofthenight at gmail.com> wrote:

> Right now, I'm working on a code formatter for the Descent IDE (http://www.dsource.org/projects/descent ), and I'm planning to make a (or possibly more than one) "default" profile for code style. All this stuff will be configurable down to the tiniest detail (if you want spaces before the comma but not after in superclass/interface lists and after the comma but not before everywhere else, that'll be evry possible), but having some sensible defaults would be a good thing.

Fraser, how about making your formatter attempt to detect the style from existing code? I've seen some other code formatters do it, and if done right, it could be a killer feature. Just feed it a file that's consistently formatted with your style, and it would detect formatting rules from that file's existing formatting. It would have to somehow infer rules that aren't present in the given code - for example, if there is only one comma-separated list in the example (say, an argument list), it would apply the same formatting to other comma-separated lists.

-- 
Best regards,
  Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list