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

> Erlang has the superpowered version of this - binary pattern matching, that lets you pattern match on a bitstream directly.

Erlang has a super-powered version of the pattern matching bit, but not of what GP actually likes about it:

> you have to handle every case whenever you're matching on it

because Erlang is dynamically typed. So partial patterns are acceptable, and not entirely uncommon.



You can use partial patterns in Rust too. I think perhaps you meant partial matches?


Yeah.

Also faillible patterns outside of conditional contexts. It acts as an assertion which is nice, but the assertion is implicit which is less nice.




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

Search: