Back in D after some absence, some perspective

Timon Gehr timon.gehr at gmx.ch
Wed Mar 10 02:46:26 UTC 2021


On 09.03.21 09:32, Imperatorn wrote:
> On Monday, 8 March 2021 at 18:02:35 UTC, Max Haughton wrote:
>> On Monday, 8 March 2021 at 17:10:38 UTC, Timon Gehr wrote:
>>> [...]
>>
>> I agree. I also think the weird tuple situation we have now has to 
>> look bad from afar, e.g. we have Phobos tuples which aren't great, dmd 
>> tuples which are weird, AliasSeq, T... etc. Furthermore, I read your 
>> proto-DIP about Tuples, and I think it's a good step forward, but it 
>> strikes me that maybe we should just go the whole way and have 
>> first-class tuples (Even just as a direct rewrite to a struct would be 
>> a step forward in terms of allowing the kind of unpacking syntax that 
>> I would hope almost everyone wants).
> 
> Yeah, soundness is more important than features imo

It sounds nice, but I think it is just not true, and it has never been 
the philosophy driving D's design. Right now, D is unsound in various 
ways, but we like to use it anyway, because it has features.

Soundness is important, but I suffer more from lack of features than 
lack of full soundness. E.g., philosophically, assertion failures 
causing UB in @safe code is a terrible, unsound design, but in practice 
I can avoid it and I have given up on trying to make the point to 
Walter. On the topic of assertion errors: `in` contract inheritance 
catches AssertError. Is this an issue that's more important than 
built-in tuples just because it is a case of blatant unsoundness? Not 
even close.

I also think it is quite safe to assume that DMD will never implement 
any consistent semantics for the interaction of forward references and 
introspection (because it will never be the top-priority issue), but I 
don't want to give up on forward references nor introspection.


More information about the Digitalmars-d mailing list