danhab99@programming.dev to TypeScript@programming.dev · 1 year agoTypescript is implementing a using keywordwww.totaltypescript.comexternal-linkmessage-square6fedilinkarrow-up14arrow-down10cross-posted to: tech@kbin.social
arrow-up14arrow-down1external-linkTypescript is implementing a using keywordwww.totaltypescript.comdanhab99@programming.dev to TypeScript@programming.dev · 1 year agomessage-square6fedilinkcross-posted to: tech@kbin.social
minus-squarecwagner@lemmy.cwagner.melinkfedilinkarrow-up2·1 year agoAnother piece from C#, now share the other way and give us all the union types, okay?
minus-squareKogasa@programming.devlinkfedilinkarrow-up1·1 year 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-squareLmaydev@programming.devlinkfedilinkarrow-up1·1 year 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.
Another piece from C#, now share the other way and give us all the union types, okay?
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.