sumtypes for D

H. S. Teoh hsteoh at qfbox.info
Wed Nov 30 00:10:47 UTC 2022


On Tue, Nov 29, 2022 at 11:56:40PM +0000, Vladimir Panteleev via Digitalmars-d wrote:
> On Monday, 28 November 2022 at 09:27:11 UTC, Walter Bright wrote:
> > I've written most of a DIP for one. Should I:
> 
> I really wish that instead of adding more language features, we would
> improve the language so that things like this are implementable *in*
> the language.
[.[..]

+1, I think this is a better approach.  If a library type can't do what
a built-in type does, then extend the language until it can. As Andrei
said in TDPL: "experience has shown time and again that offering many
magic types that are unattainable to user code is a frustrating
proposition and a sign of poor language design" [TDPL, 2010 ed, p.239].


T

-- 
Knowledge is that area of ignorance that we arrange and classify. -- Ambrose Bierce


More information about the Digitalmars-d mailing list