Open avivcarmis opened 2 years ago
i vote for nullable types like in ts, kotlin, dart. with '?' and '??' operator.
What fits best into Go IMHO would be a Zig approach.
!int for an error result (short for (int, error)) ?int for a nullable result
( prefix modifiers like []int )
Do we want to go with the direction of Swift, Kotlin, and TypeScript with nullable types?
Or the direction of Rust and Scala with Option type?
More context in this blog post section.