Languages & Runtime Community Standup - Considering discriminated unions

preview_player
Показать описание


Featuring: Matt Warren, Kathleen Dollard @KathleenDollard, Bill Wagner @BillWagner, Immo Landwerth @Terrajobst

#csharp
Рекомендации по теме
Комментарии
Автор

If this is done without Runtime changes, I don't believe we're going to get the results the community desires.

jimiscott
Автор

I can't wait to start using this feature ... I hope they consider adding this soon to the c# language 🤞

alirezanet
Автор

It is happening, I can't believe it.

iuribrindeiro
Автор

Single case unions are like type aliases (typedefs based on an existing type) .
OneOf is a workaround so not sure why that would be needed once the feature is released.
Option and Result should be provided by standard library.
Making void a type would be nice.
Making semicolons optional wherever possible would also be appreciated.
And yes, union types are taking too long. Thanks for asking :)

ML/OCaml/F# could serve as examples. Even Rust has this (Rust enums) surprisingly.

scosminv
Автор

Nothing type is not the Union type. It is a type that represents unreachable code, useful for exhaustive checks.

marikselazemaj
Автор

I just hope solutions the F# team came up with are discarded out of hand because of “not invented here” thinking

XKS
Автор

Ada has had discriminated types for many decades now.

bobweiram