3 ms·
There are type switch statements, at least, and libraries like https://github.com/phelmkamp/valor https://github.com/phelmkamp/valor can use them to provide mor
by DylanSp 2y ago
There are type switch statements, at least, and libraries like https://github.com/phelmkamp/valor https://github.com/phelmkamp/valor can use them to provide more concise abstractions. The really frustrating thing is that interfaces can't have methods that introduce new type parameters, so we're stuck with standalone functions like `optional.Map(optionalFoo, barFunc)` instead of `optionalFoo.map(barFunc)`>