Back in D after some absence, some perspective
Timon Gehr
timon.gehr at gmx.ch
Mon Mar 8 17:10:38 UTC 2021
On 08.03.21 16:39, deadalnix wrote:
> On Monday, 8 March 2021 at 11:01:17 UTC, Timon Gehr wrote:
>> On 02.03.21 22:05, deadalnix wrote:
>>> I think it is hard too argue that D doesn't have enough feature at
>>> this time.
>>
>> OTOH, there is no pattern matching, in particular you can't pattern
>> match tuples. Therefore, it is also very hard to argue that D is
>> feature-complete. (Has it skipped leg day?)
>
> While pattern matching would be nice, I place soundness above it.
For me it's not even a close contender. There's no soundness now and
soundness is much harder to achieve than (or even without) obvious
fundamental features. In comparison, soundness almost seems like a lost
battle at this point.
> Plus, if you look at the SDC codebase for instance, you'll see that you can go
> pretty far as a library.
auto firstThingSecondThing=query!((ref foo)=>tuple(foo.a, foo.b))(data);
auto firstThing=firstThingSecondThing[0],
secondThing=firstThingSecondThing[1];
Huge pain.
auto (firstThing,secondThing)=query!((ref foo)=>(foo.a, foo.b))(data);
Much better.
Whatever string mixin hack you can come up with is not good enough.
More information about the Digitalmars-d
mailing list