Hacker News new | ask | show | jobs
by cmoski 1213 days ago
Are you going to be able to pattern match as nicely as one can on the BEAM?

In practice, is the handle function going to match on each message and then call a handler for that specific message which may then match on the state?

1 comments

That's really up to you, Rust has great pattern matching imho, rivaling Erlang's for sure, but with some nice syntax upgrades. Additionally in Ractor, RPC's are strong-typed to the reply type, so a `call` in Erlang might result in the wrong type coming back which then you have to handle in your reply pattern matching or crash. This isn't possible in Rust w/ Ractor, since you _know_ the strong type in advance and can't send an incorrect value.