Range Redesign: Copy Semantics

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Jan 22 02:17:35 UTC 2024


On 22/01/2024 3:08 PM, Jonathan M Davis wrote:
> On Sunday, January 21, 2024 10:39:41 AM MST Richard (Rikki) Andrew Cattermole
> via Digitalmars-d wrote:
>> On 21/01/2024 11:58 PM, Jonathan M Davis wrote:
>>> Either way, if we're doing a new major version of Phobos, we'll be
>>> reworking a variety of stuff anyway, and so Nullable would presumably be
>>> on the list (e.g. I think that it was a big mistake to make it a range,
>>> and I'd remove that functionality; slicing it to get a range is one
>>> thing, but the fact that it itself is a range definitely causes problems
>>> in generic code).
>> Umm, why would we bring back Nullable?
>>
>> By then we'd have sum types which can represent it in the language far
>> better.
> 
> Much as I know that you like the idea of sum types, AFAIK, it's never been
> officially agreed that we're going to have them in the language, and even if
> we do get them, I don't know what that's actually going to look like.

Given that Walter has put together a DIP for them, I'm fairly confident 
it is a question of when not if.

https://github.com/WalterBright/DIPs/blob/sumtypes/DIPs/1NNN-(wgb).md


More information about the Digitalmars-d mailing list