4 ms·
Channels + select are a pretty good replacement for what one usually uses pattern matching in Erlang. There are pros and cons for both models, but they are rou
by uriel 15y ago
Channels + select are a pretty good replacement for what one usually uses pattern matching in Erlang.
There are pros and cons for both models, but they are roughly equivalent and I never missed pattern matching in Go.
- ootachi 15y agoPattern matching isn't just a feature to aid concurrent programming; it's extremely helpful for all sorts of code. However, since Go doesn't have unions (either tagged or unsafe), pattern matching in Go wouldn't be particularly powerful anyway.