4 ms·
Emulating ADTs without language support/pattern matching is quite awkward. A prime example is std::optional in C++. .map() et al only get you so far. When ext
by the_duke 5y ago
Emulating ADTs without language support/pattern matching is quite awkward. A prime example is std::optional in C++.
.map() et al only get you so far.
When extracting the value in Go you either have to return a pointer / error pair or abort. Both of which introduce awkward code patterns and potential for misuse.