What are (were) the most difficult parts of D?
Basile B.
b2.temp at gmx.com
Thu May 12 12:13:32 UTC 2022
On Thursday, 12 May 2022 at 11:50:59 UTC, Alain De Vos wrote:
> Some keywords are overloaded and have different meaning when
> used in a different place.
> Also some syntactic-sugar is way to much meaning too many
> different ways to do the same thing. I would prefer one way
> which is advised.
`ptr1 is ptr2` VS `is(T==U)` is ok even if the keyword is reused
for two different things.
Problem is more (from
https://dlang.org/spec/expression.html#is_expression)
```
is ( Type : TypeSpecialization , TemplateParameterList )
is ( Type == TypeSpecialization , TemplateParameterList )
is ( Type Identifier : TypeSpecialization , TemplateParameterList
)
is ( Type Identifier == TypeSpecialization ,
TemplateParameterList )
```
I never remember those variants, because basically you never need
them...
They were required for std.traits and that's it.
More information about the Digitalmars-d-learn
mailing list