does D already have too many language features ?

Julian julian.fondren at gmail.com
Thu Apr 11 22:21:30 UTC 2019


On Thursday, 11 April 2019 at 20:41:00 UTC, H. S. Teoh wrote:
> On Thu, Apr 11, 2019 at 03:00:44PM -0400, Nick Sabalausky
>> English has all sorts of words that are rarely, if ever, used. 
>> But does anybody really complain that English has too many 
>> words? No.
>
> Second-language learners would object, but OK, I get your 
> point. :-P

My received wisdom from language school:

- there are five categories of language difficulty

- Spanish is an example Cat II language, so not that hard at all.
   You can be competent in it in less than a half a year of study.

- Chinese is an example Cat IV language. For obvious reasons.

- Korean is an example Cat V language. For this reason: Koreans
   speak really fast. Even though the language might intrinsically
   have learning advantages over Chinese, as practiced by Koreans,
   it's harder to be competent in it.

- English is the only other Cat V language. Because of the
   unparalleled vocabulary bloat, it's extremely hard to present
   yourself as a competent speaker.


Rather than hear that more features is axiomatically good, I'd 
like
to hear that D's actual featureset is good. And from the opposite
side I'd rather "this feature right here is too much for this
reason".

If it's just a battle of impressions, then yes I very quickly got
the impression that D has tons of features. That was solidified
when I tried a JS-style lambda and it worked(!) and then I 
couldn't
even find any documentation showing that it *should* work. So,
might this tend to make randomly-selected D code harder to
understand, because it has the potential to use all these features
that you then have to know about? Sure. It follows that D *should*
be harder to read than a language with less features that other
people's code could possibly exhibit.

Do I get the impression that D is actually harder to read, though?
Not yet. That's a feat of language design -- that even though 
there
are many pieces, they fit together well enough that you focus on
the whole rather than the parts. Bad example: it's easy to think 
of
an esolang that's enormously simpler than D, but with code you'd
have a much harder time having to understand than typical D code.



More information about the Digitalmars-d mailing list