Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Pattern 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: