Does D have too many features?

q66 quaker66 at gmail.com
Sat Apr 28 14:05:10 PDT 2012


On Saturday, 28 April 2012 at 20:50:30 UTC, H. S. Teoh wrote:
> On Sat, Apr 28, 2012 at 09:22:59PM +0200, q66 wrote:
> [...]
>> - AAs integrated in the language; you barely ever use AA 
>> literals and
>> having them purely in Phobos would help get rid of the runtime 
>> fat, as
>> well as better implementations
>
> On the contrary, AA's are a major reason I started programming 
> in D. In
> this day and age, it's simply inexcusable to *not* have some 
> kind of
> hash type available by default.
>

Besides AA literals, library can handle this JUST FINE.

>
>> - Phobos is too fat - it needs to shrink to just a few core 
>> modules,
>> others being distributed via some system like CPAN for Perl
>
> Um... that's what a *library* is supposed to be: a large 
> collection of
> useful stuff from which you can pick the few that you need 
> right now.
>

Too large collection becomes too hard to manage. Separating it 
and distributing in style "you pay for what you use" is IMO the 
right approach.

>
>> - Properties - they're kinda broken at this point and the 
>> value is
>> questionable
>
> What kind of properties are you referring to?
>

The @property crap. It's broken. If anything, it needs something 
like in C#.

>
>> - @trusted @system
>
> These are necessary.
>

They're far from necessary.

>
>> - Exception handling - a lot of runtime, questionable value
>
> I completely disagree. No exception handling means lots and 
> lots and
> lots of boilerplate code for checking error codes, return 
> values, which
> are too tedious to write, which translates to many people 
> leaving them
> out and ending up with unreliable code that fail silently or 
> crash
> outright when a function call they assumed would work stopped 
> working.
>
> If you've worked in large multi-person projects, you'll see 
> very quickly
> why you *need* exception handling. No modern language can do 
> without
> exception handling. Maybe you have a beef with how it's 
> currently done
> in D, but regardless, you *need* exception handling of some 
> kind.
>

The exception handling system via try/catch is as bad and tedious 
as error codes, except the added runtime. It all roots from the 
idea "catch everything that throws". This is broken, as you DON'T 
always need to handle all sorts of errors (letting it segfault or 
something sometimes simply proves to be better than trying to 
save the situation; or you can simply assert it). Also 
http://yosefk.com/c++fqa/exceptions.html#fqa-17.1

>
>> - Versions - not redundant, but needs a better system (with 
>> AND/OR,
>> possibility of de-versioning, the assignment op to set 
>> versions is
>> kinda bad)
> [...]
>
> I find versions sorta neat... and they're simple enough that 
> they don't
> add to much bloat to the language. (Whereas if you added AND 
> and OR to
> them, then they start duplicating the function of static if, 
> and that's
> when they become redundant.)
>

They're nearly unusable now. And the syntax simply makes no sense.

>
> T



More information about the Digitalmars-d mailing list