A summary of D's design principles

Jonathan M Davis jmdavisProg at gmx.com
Wed Sep 29 10:36:00 PDT 2010


On Wednesday, September 29, 2010 07:59:25 Sclytrack wrote:
> > >   D   C#
> > > 
> > > --- ---  <-- high level
> > > 
> > >   |  ---
> > > 
> > > ---      <-- low level
> 
>              C#
>             ---
> 
>              |  <---------gc
> 
>        Delphi|
>         ---  |
> 
>          |   |  <---------custom attributes, reflection, generic
>          |   |  collections
> 
>      D   |   |
>     ---  |   |
> 
>      |<--|---|------------gc, better templates, experimental purity
> 
> C++  |   |   |
> ---  |   |   |
> 
>  |   |   |  ---
>  |   |   |  
>  |   |   |   <-------------Assembler
> 
> --- --- ---
> 
> Delphi might make an excellent RAD
> and system programming language.

Except that it's not as linear as all that. Sure, C# has features that D doesn't 
have, but theree are features that D has that C# doesn't. The same goes for 
Delphi. Take reflection, for instance. D has compile-time reflection, which 
combined with templates, can be extremely powerful, but it lacks runtime 
reflection which makes certain types of stuff pretty much impossible. C#, on the 
other hand, has runtime reflection, but it lacks both templates and compile-time 
reflection (though lacking templates, I'm not sure that compile-time reflection 
would do it much good). It's not an obvious case of one being higher level or 
superior to the other. It's simply a different set of abilities, and each of them 
is better in a particular area but worse in another.

Personally, I tend to think about a language being high level if it is capable 
of high-level abstractions and doesn't force you to use the low level stuff like 
pointers. So, whether a language _has_ the low level stuff is irrelevant to my 
way of thinking. It's whether it has the high level stuff and doesn't force you 
to use low level stuff. D has the high level stuff (though obviously there are 
some types of high level features that it lacks that other languages lack, just 
like many of those languages lack some of the high level features that D has) 
and doesn't force you to use its low level stuff, so it's a high level language. 
That's pretty much how I look at it. The fact that it has high level 
capabalities makes it high level even if it has low level capabilities. But 
since even the terms high and low level are pretty subjective, it's not like 
you're ever going to get a definitive scale or definition on the matter.

- Jonathan M Davis


More information about the Digitalmars-d mailing list