I wish I could use D for everything

Walter Bright newshound1 at digitalmars.com
Thu Apr 30 22:32:42 PDT 2009


dsimcha wrote:
> To me a fair assessment of whether a complex feature belongs in a language is the
> following:
> 
> Given the target audience, will the average person save more time by using the new
> feature than he/she spends learning it?

Not a bad definition.

> The assumption here is that you will have to learn most or all of the features of
> your language of choice, because you will have to understand other people's code.
>  D2 is a complex language, but it's not complex in a haphazard way.  It's complex
> because it statically proves stuff about your code (const, etc), and allows
> extremely powerful, generic user-defined types.  These are the kinds of things
> that most people only dream about.

Any fool can design something complicated. Genius is in finding the 
underlying simplicity. For example, in C++, function overloading is done 
with a very complicated set of rules and a mass of special cases. But 
C++ function template overloading is done with one simple rule: partial 
ordering. C++ couldn't go back and fix function overloading, but D can. 
D overloads both functions and function templates with partial ordering, 
which is a simple rule that gives results equal to or better than the 
complex rules.



More information about the Digitalmars-d mailing list