A summary of D's design principles

Walter Bright newshound2 at digitalmars.com
Sat Sep 18 03:44:30 PDT 2010


Russel Winder wrote:
> On Fri, 2010-09-17 at 14:33 -0700, Walter Bright wrote:
>> retard wrote:
>>> FWIW, if you're picking up one of the most used languages out there, 
>>> their list won't differ that much:
>> Exactly. Much of that can be summed up as D being intended for professional 
>> production use, rather than:
>>
>> 1. a teaching tool (Pascal)
> 
> Java, Python, C++, Alice are the languages of teaching these days.
> Pascal died a death when Borland did.

Pascal was specifically designed by Wirth as a teaching language (he says so in 
his Report, I can quote it for you if you like!). Java, Python and C++ were not. 
I know nothing about Alice. Pascal predates Borland's Turbo Pascal by more than 
10 years, and ironically it is TP that brought it back from the dead.


>> 2. a research project (Haskell)
> 
> Haskell stopped being a research project many years ago, Haskell
> development now happens in companies (including Microsoft) as much as in
> universities and is about creating good examples of software
> engineering.  Research languages are things like X10, Chapel, OCaml, C
> ++.

It still was designed as a research project. It even says so in the Haskell 98 
report:

"The committee intended that Haskell would serve as a basis for future research 
in language design, and hoped that extensions or variants of the language would 
appear, incorporating experimental features." -- Haskell98


>> 3. being focussed on solving one particular problem (Erlang)
> 
> Yes but what a problem to have solved:  running the world's telephony
> backbone with essentially zero downtime.

I didn't say it wasn't successful at solving it :-)


>> 4. designed to promote a related product (Flash)
> 
> What's the related product?

I believe it was to sell their (Macromedia) multimedia development environment. 
But if you don't like that, there's Javascript which was developed to push 
Netscape Navigator ahead of Explorer, and Microsoft responded with Vbscript to 
push Explorer.


>> 5. designed for kids (Logo)
> 
> Actually this example is probably fair.
> 
>> 6. designed for non-programmers (Basic)
> 
> As was Cobol, Fortran, spreadsheets (Visicalc, etc.).  There are
> probably more spreadhseet programs out there than any other language:
> counting all C, C++, D, and Java programs probably don't even get
> close.

Basic is famous in that its charter specifically was for non-programmers. Cobol 
was designed for managers to be able to understand the code, not to write it (a 
slightly different aim). Was Fortran I really developed for non-programmers, or 
just to make programming easier (which it was wildly successful at)? Visicalc 
programming wasn't specifically developed for non-programmers, it was developed 
as whatever was expedient and easy to implement. It was developed in 6502 
assembler. You're not going to develop a sophisticated language under such a 
constraint.


>> 7. one paradigm to rule them all (Smalltalk)
> 
> Assembly language,  C.

Assembler doesn't have a paradigm, in any case not one that it was designed 
around. C wasn't designed around a single paradigm, either, it was intended as a 
general purpose language, and was specifically not designed for any particular 
area of application (so says K&R). C was designed to map efficiently to the 
PDP-11 instruction set.


>> 8. gee, math is hard (Java)
> 
> A very large majority of students study computing and computer science
> because they are failed mathematicians.  This probably means every
> programming language is the way it is because maths is considered hard
> by the inventors.

I meant it as an allusion to "gee, C++ is hard". The "gee, math is hard" is an 
infamous quote attributed to one version of the Barbie doll that had a 
pull-to-talk string. Java was originally promoted as a simpler C++.


>> 9. implementing skynet (Lisp)
> 
> I wonder why Lisp gets so much flack.  It is unique amongst all
> programming languages in that code = data is commutative.  This makes
> Lisp interesting.  Well perhaps not Common Lisp, but Scheme and Clojure
> are.

I meant it in the sense that Lisp's original use was to implement Artificial 
Intelligence.


> I think creating lists such as this is very counter-productive as an
> approach to trying to promote anything.  It also reflects badly on the
> thing being promoted.

Sorry, I had hoped it was both funny and to illustrate that there are languages 
that are designed for purposes other than professional application programming. 
It's not bashing a language to say it has a purpose other than D's purpose, 
especially when I can quote the inventor stating such.


More information about the Digitalmars-d mailing list