Which language futures make D overcompicated?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Feb 9 21:27:34 UTC 2018


On Friday, February 09, 2018 20:49:24 Meta via Digitalmars-d wrote:
> On Friday, 9 February 2018 at 07:54:49 UTC, Suliman wrote:
> > I like D, but sometimes it's look like for me too complicated.
> > Go have a lot of fans even it not simple, but primitive. But
> > some D futures make it very hard to learning.
> >
> > Small list by me:
> > 1. mixins
> > 2. inout
> > 3. too many attributes like: @safe @system @nogc etc
> >
> > Which language futures by your opinion make D harder?
>
> I can't say that I've ever really found D complicated. I think
> the main reason for that is because my first language was C++,
> and there's really nowhere to go but up from there (I was
> experienced with a few other languages as well like Java, Scheme,
> Basic, etc. but none I would regard as complex).
>
> I think the perception of D being complicated is more from
> programmers coming from Python/Ruby/JS (and to a lesser extent,
> Haskell/Scheme/Java). D is quite different if you're coming from
> a "VM" or "scripting" language because it exposes you to a lot of
> new concepts such as static typing, value types, templates,
> monomorphization, immutability, memory layout, linking and
> compilation, compile-time vs. runtime, etc. It's not that these
> programmers are less skilled or less knowledgeable; it's that if
> they've never used a language that has forced them to consider
> these concepts, then it looks to them like D is a massive step up
> in complexity compared to the language that they're used to.
>
> I think if you asked 100 C++ programmers whether they thought D
> was a complicated language, 99 of them would say no. If you ask
> 100 Python programmers, 99 would probably say yes.

I have to agree with all of this. I've never found D as a whole to be overly
complicated. C++ wins _that_ contest hands down. And I've found languages
like Java to be overly simple (e.g. one of my professors in college said
that Java didn't become a real language until they added generics, because
that actually added some complexity to it). IMHO, any language that's really
worth using isn't going to be simple.

Now, that's not to say that I think that every feature in D should be there
(e.g. I'd rather that template specializations not exist, because template
constraints make them completely unnecessary and ultimately an unnecessary
complication), and there have certainly been mistakes made along the way
(e.g. auto-decoding was a mistake, and @property never went anywhere like it
was supposed to, leaving it there kind of like an appendix). But I wouldn't
really say that D is overly complicated, just that it could be better.

But I also come from a C++ background, which significantly colors my view of
things. I suspect that I'd have a very different viewpoint if I'd started
with something like Java, python, or Go, since those languages are all far
simpler. But then again, maybe I'd still end up finding D's level of power
and complexity refreshing. I originally ended up finding D, because I wanted
a language with some of the safety features that Java had but without losing
all of the power of C++. C++ had too many problems that resulted in bugs,
and Java had stripped out too many features in comparison. Fortunately, D
has proven to provide a good balance in that respect - not perfect, but by
far the best I've encountered.

- Jonathan M Davis



More information about the Digitalmars-d mailing list