Porting std.typecons to Phobos 3

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Nov 9 05:58:02 UTC 2024


On Friday, November 8, 2024 10:32:38 PM MST Richard (Rikki) Andrew Cattermole 
via Digitalmars-d wrote:
> I'm going to suggest that we avoid bringing over Tuple and Nullable to
> PhobosV3.
>
> We don't need them currently, and they may have an implementation in
> language by the time that we do.
>
> However, planning out how we might bring them over is a good idea!

Nullable is very much needed (e.g. it will be needed for the range stuff),
and Tuple is needed as long as we don't have a tuple type in the language
(which we may or may not ever get). And as a general rule, I think that it's
a mistake to choose to not add something to Phobos v3 just because there's a
desire to add a language feature that would make it unnecessary - especially
when there's no guarantee that such a feature will ever arrive, and even if
it does, it could be a while.

If we do later get language features that make them unnecessary, then we can
adjust things then.

- Jonathan M Davis





More information about the Digitalmars-d mailing list