Which language futures make D overcompicated?
Timon Gehr
timon.gehr at gmx.ch
Sat Feb 10 01:24:55 UTC 2018
On 09.02.2018 19:31, H. S. Teoh wrote:
> On Fri, Feb 09, 2018 at 05:56:38PM +0000, Dukc via Digitalmars-d wrote:
>> On Friday, 9 February 2018 at 07:54:49 UTC, Suliman wrote:
>>> Which language futures by your opinion make D harder?
>> Not many! D is a fairly complex languague, but just about everything
>> feels like to be here for a good reason. That includes many oft-hated
>> things: inout, auto ref, goto, BetterC...
> TBH, I'm not a fan of inout. Not because of how most people feel, that
> we shouldn't have it; IMO it doesn't go*far enough*.
Actually, it goes way too far. :o)
https://issues.dlang.org/show_bug.cgi?id=17743
https://issues.dlang.org/show_bug.cgi?id=17744
> For example,
> there's currently no way to express conveying the constness of a
> delegate argument's parameter to the return value, which would have been
> useful in some places in generic code.
>
>
The fundamental issue is that D's type system has no parametric
polymorphism, and 'inout' is an approximation to some special case of
it, but it is not so clear which special case. It actually differs based
on context. (IIRC the meaning of 'inout' has subtly changed in the past
to fix bugs caused by some typing rules assuming one thing when others
assumed another, and one of them was randomly given precedence.)
More information about the Digitalmars-d
mailing list