Which language futures make D overcompicated?

Jacob Carlborg doob at me.com
Mon Feb 12 20:15:59 UTC 2018


On 2018-02-09 08:54, 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?

1. Metaprogramming is a mess. Metaprogramming in D is split across many 
features: like templates, __traits, the "is" expression, .tupleof 
TypeInfo and probably others I have forgot.

2. The "is" expression. This is one of the most complicated features in 
D. I understand most of the examples in the spec [1], but then when you 
see how this feature is used in the wild, it's like: what!... how did 
you... that doesn't make sense.

3. Ranges only works with mutable arrays and don't work with tuples

4. "alias" parameters don't accept all values/types/symbols that "T..." does

5. Lambdas don't work, as far as I know, with alias or type parameters. 
That is, it's not possible to use a lambda to as a predicate to, for 
example, filter a tuple of types

These are all annoying issues when you work with metaprogramming 
resulting to add workarounds that makes the code unnecessary complicated.

[1] https://dlang.org/spec/expression.html#is_expression

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list