News for hackers. Stuff that matters.
Re:Notes on a Smaller Rust by akavi on Thursday July 18, 2019 @09:00AM (#20469262)
The lack of ADTs in mainstream languages is really quite baffling, given their obvious utility.

Thankfully it looks like they’re trickling in via Typescript/Swift/Kotlin.

Re:Notes on a Smaller Rust by sambal on Thursday July 18, 2019 @09:12AM (#20469379)
Do TS and Kotlin support them now? Last I checked TS was relying on string comparisons and Kotlin wasn’t even bothering outside sealed classes
Re:Notes on a Smaller Rust by sixbrx on Thursday July 18, 2019 @11:25AM (#20470799)
TS is a bit more powerful than it appears here, because string literal values are recognized at the type level, so can be checked by the compiler when distinguishing cases. See for example: "Discriminated Unions" at https://www.typescriptlang.org/docs/handbook/advanced-types.....