Reddit: why aren't people using D?

sclytrack sclytrack at pi.be
Thu Jul 23 09:11:19 PDT 2009


== Quote from Rainer Deyke (rainerd at eldwood.com)'s article
> Walter Bright wrote:
> > My experience with C++ people sticking with it is they are so used to
> > the problems they no longer see them. To me it's like the mess in one's

My experience with D people sticking with it is ...

Not knowing that it can be done easier in another language is a bliss.

> > house. One doesn't notice it until going on a vacation (i.e. learning a
> > another language), having one's hotel room cleaned every day, then
> > coming home and suddenly seeing how untidy it is <g>.
> I want to throw these words back at you, because my first impression of
> D was "the bastard child of C++ and Java, with a random assortment of


Delphi
------

C# = Delphi + Java
D = (Java) + C++

Seems to me D only needs to learn from Delphi.


Delphi is the first RAD language designed to easily interact with
the IDE. Java wasn't, see the tonnes (non-metric unit of amount of code)
of code that the IDE produces. I believe now Java has all the necessary
features, it is just that swing just isn't the VCL. They could easily add
a D style "property/method" syntax but they just won't since they want to
stick to swing, which I think they need to drop.


Two important features from Delphi

1) properties: Easily distinguishable from normal methods in the reflection,
just enough to know what to display in the object inspector and not to rely on
the name of the method.

Object Inspector is a window displaying two columns, for normal properties and events.

Property Name1, Property Value1
Property Name2, Property Value2

What is the purpose of properties?

"The purpose of properties is to facilitate the interaction with the IDE"

2) published: Delphi has private, protected, public, published.
2.1) All published methods and properties are shown in the reflection, RTTI (sort
of a selective reflection {$M+}).
2.2) Everything passed to a published methods or property is serializable
 (in Delphi terminology derives from TPersistent or basic type like integer and stuff)
2.3) You can't have published fields only published properties, and methods
(Also note D people want properties to look like fields somehow)
(Delphi starts their fields with F in front FNumber).

Delphi might not have full reflection but the minimum it has is very powerful.

The VCL (state of the art library) is well designed, the components are AWARE
of either running in the client application or running from within the IDE,
hence can change their behaviour, to adapt to the changes, minimizing what the
actual IDE has to do. Part of its design is a virtual constructor.


C++ + Another Language layered on top of C++
--------------------------------------------

1) Combining C++ with another language is "fairly" easy.

Okay D is a super enhanced C++. C# is a state-of-the-art language
for creating applications in a very simple manner. D is nowhere near C#.
C++ can easily be combined with Java and C# with the use of swig. D with
the introduction of the garbage collector, this becomes difficult.
(The "pied" guy might disagree)

I think for D to be successful it will not only have to be an enhanced C++
but will have to overtake C#.



More information about the Digitalmars-d mailing list