@danhab99 to TypeScript • 11 months agoTypescript is implementing a using keywordwww.totaltypescript.comexternal-linkmessage-square5arrow-up120arrow-down10cross-posted to: [email protected]
arrow-up120arrow-down1external-linkTypescript is implementing a using keywordwww.totaltypescript.com@danhab99 to TypeScript • 11 months agomessage-square5cross-posted to: [email protected]
minus-squareKogasalink3•11 months agoDiscriminated unions have been In The Works™ for quite a while. I believe they were cut from the C# 12 roadmap. But maybe C# 13? I think a source-generation based approach similar to OneOf isn’t unlikely.
minus-square@Lmaydevlink1•10 months agoYeah unfortunately tacking them onto a 20 year old language is not easy. It’s great to see it being worked on but there is a long way to go.
Discriminated unions have been In The Works™ for quite a while. I believe they were cut from the C# 12 roadmap. But maybe C# 13?
I think a source-generation based approach similar to
OneOf
isn’t unlikely.Yeah unfortunately tacking them onto a 20 year old language is not easy.
It’s great to see it being worked on but there is a long way to go.