Why I chose D over Ada and Eiffel

Ramon spam at thanks.no
Thu Aug 29 11:38:39 PDT 2013


On Thursday, 29 August 2013 at 14:50:18 UTC, Gour wrote:
> On Thu, 29 Aug 2013 16:13:06 +0200
> "John Colvin" <john.loughran.colvin at gmail.com> wrote:
>
>> just something I whipped up in a few mins:
>
> [...]
>
> Thanks. So, it's possible, but (maybe) it's not as elegant.

Now, let's be fair. While the point you brought up is one that I,
too, do very much like with Ada, it's not magic what Ada does.

Agreed, Ada has it wrapped in nice syntactic sugar, but in the
end such a subtype is just the basic type with range checking
done bhind the curtain, while D does it publicly visible and in
the open (and, yes, less nicely sugared).

In the end it's about the concept, so the relevant question is
not "Does D offer the same sugar and wardrobe?" but "does D offer
a way to implement that (important) concept other than (C-like)
hand inserting range checking code everywhere". The answer is
"yes, it does".

A by far bigger concern in my minds eye is D's somewhat unlucky
DbC mechanism or, more precisely, the somewhat step-son treating
by disabling DbC in realease code.
I strongly feel that something like "@DbC" (and @noDbC) would be
far more satisfying.

A+ - R


More information about the Digitalmars-d mailing list