Solution for Fatal flaw in D design which is holding back widespread adoption(tm)

Nick Sabalausky a at a.a
Wed Mar 31 10:57:03 PDT 2010


"Nick Sabalausky" <a at a.a> wrote in message 
news:hp022i$t1h$1 at digitalmars.com...
> "Bane" <branimir.milosavljevic at gmail.com> wrote in message 
> news:hovb6n$13sr$1 at digitalmars.com...
>> Would something like tidyMyHorribleDcode be a solution?
>> Put a conf file in source somewhere which states how many 
>> tabs/spaces/whatever.
>> Before you comit code back to shared repository you run tidy to convert 
>> code to D spe format.
>>
>> When you checkout code from repo you run tidy with your custom settings.
>>
>> A great & simple solution for trivial problem not worth talking about it.
>>
>
> It would be a start. Used by itself it would be a bit of a hassle, but 
> having it hooked up to auto-run upon checkout/commit or upon save/load in 
> the editor (this would ideally be better since you can double-check the 
> reults before committing) would be pretty much what I already had in mind 
> as a solution.
>
> Alhough it wouldn't necessarily even need to be a full-fledged source 
> formatter. Just something to sanitize the whitespace between start-of-line 
> and anything non-whitespace would be a huge improvement *and* be 
> cross-language.

And here's an even crazier idea: Some sort of well-thought-out UCF format 
(Unicode Code Format) that is like plain-text, but includes a standard 
metadata header (typically hidden while editing) that can help sort all this 
stuff out, and maybe other things as well. Obviously it would require 
special support from compilers and editors, but if it was well-designed 
(including discouragement of proprietary extensions - don't want a repeat of 
HTML) then I think it would be worth trying to push.





More information about the Digitalmars-d mailing list