sumtypes for D

Walter Bright newshound2 at digitalmars.com
Tue Nov 29 06:45:37 UTC 2022


On 11/28/2022 6:42 PM, deadalnix wrote:
> On Tuesday, 29 November 2022 at 01:27:32 UTC, Walter Bright wrote:
>> It would be nice if you enumerated those fundamental problems. I don't know 
>> what they are.
> 
> I have done so numerous times. Every single god damn time you answer the same 
> thing.

I don't doubt you. The trouble is, the n.g. is ephemeral. Once it scrolls away, 
it's forgotten.

A more permanent document is needed, one you can just link to instead of 
repeating yourself, which I agree must be annoying for you. For example, I've 
proposed an improvement to C for years, and wrote an article about it which I 
just link to rather than having to explain it again endlessly.

https://www.digitalmars.com/articles/C-biggest-mistake.html

Adding Enhancement Requests to bugzilla also can serve this purpose.


> IT IS NOT POSSIBLE TO WRITE A COLLECTION IN D THAT BEHAVE PROPERLY AS PER THE 
> TYPE SYSTEM'S RULES.
> 
> Is that big enough? vector? Set? Map? Does any of it ring a bell? Even range 
> code completely shits the best as long as you throw a const in there.
> 
> Type qualifier do not turtle down (Vector!int and Vector!const(int) are 
> completely unrelated constructs), the top level qualifier need to be able to pop 
> when things are passe by value, etc...

Top level qualifiers can be removed with:

     cast()expression



More information about the Digitalmars-d mailing list