A summary of D's design principles

retard re at tard.com.invalid
Fri Sep 17 05:44:36 PDT 2010


Thu, 16 Sep 2010 21:38:24 -0400, sybrandy wrote:

> On 09/16/2010 07:04 AM, Simen Kjaeraas wrote:
>> Here's a draft of something I'd like to see. I like having the ten
>> commandments, with #0 not really counting. C&C welcome.

FWIW, if you're picking up one of the most used languages out there, 
their list won't differ that much:

>>
>>                            == The D Manifesto ==
>>
>> 0. Pragmatism is king.
>> 13. The straight path is safe and correct.
>> 14. The crooked path is passable.

Who wants to write impractical code outside the academia?! The concepts 
are way too abstract. Every member of the community has a different idea 
about this.

Every developer should realize that some languages are toys (build by 
novices), some are proof-of-concept languages for research purposes, some 
are production ready languages for scientific (programming language) 
research. You're just blatantly retarded idiot if you're using these 
unsuitable languages for commercial work. It's not like people such as 
Simon Peyton Jones are complete morons -- their languages have a 
completely different problem domain. What I typically see here is "unlike 
dontlikestupid haskell, d is gooooood. haskell hate hate hate. ivory 
tower hate hate. aarrrgh. hate"

>> 1. Safe before all, fast before the rest.
>> 6. Sugar is good for you, as is salt. In moderation.
>> 7. Too much power is almost enough.
>> 11. Avoid magic.

The most common priorities are: safety, performance, expressiveness, 
simplicity

I guess:
  1. means safety > performance
  6. means simplicity and expressiveness are in "balance"
  7. means simplicity > expressiveness
  11. means simplicity > expressiveness

So the priorities are

safety > performance > simplicity > expressiveness

Some ML based languages and maybe Scala seem to compete with D here. 
Perhaps also C# and Vala on a state of the art VM.

>>
>> 2. High level where possible, low level where necessary.
>> 4. Easy things easy, difficult things possible.
>> 5. Thou shalt not need to write boilerplate code.
>> 8. User-defined types should not be treated differently.
> (16) "Concurrency should be easy and safe"?

Most modern languages strive for these.


>> 3. If it looks like C, it works like C or never compiles.

The burden of C's legacy.

>> 9. What the compiler knows, the programmer can query.

= reflection support

>> 10. What works at run-time, should work at compile-time.

= metaprogramming support

>> 12. The tool does not pick you - you pick the tool.

D developer's IQ > 90 ?

>> 15. We're consenting adults, not suicidal maniacs.

Some future directions for the newsgroup discussion?


More information about the Digitalmars-d mailing list