OT: on IDEs and code writing on steroids

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu May 21 12:17:46 PDT 2009


dsimcha wrote:
> Bringing this analogy back to language design, if you make a language very highly
> configurable and don't provide good defaults, the barrier to entry will just be
> too high.  If people have to understand a whole bunch of intricacies of the macro
> system to do anything more complex than "Hello, world", the language will be
> confined to a highly devoted niche.  On the other hand, if you do provide strong
> conventions and sane defaults, people will probably avoid violating them because
> doing so would make their code no longer portable from programmer to programmer,
> and would probably break a whole bunch of library code, etc. that relies on the
> convention.  In other words, they would feel like they were creating a whole new
> language, and for all practical purposes they would be.  Thus, the purpose of this
> customizability would be defeated.

The symptom is visible: even with good defaults and all, such languages 
invariably come with the advice "don't use our best feature". That's 
terrible. It's a bad anguage design to put in power that can do more 
harm than good, to the extent that you openly unrecommend usage of the 
feature. Like you have a car with a very powerful engine but not a 
clutch to match (there are many, Subaru Impreza comes to mind). Then you 
have this awesome power on paper, but invariably the mechanic tells you: 
don't seal the pedal to the metal if you want to have a car.

I therefore much prefer D's templates which I use and also recommend to 
non-advanced users, plus the occasional string mixin that is a 
seldom-used feature instrumental to only a minority of idioms.


Andrei



More information about the Digitalmars-d mailing list