|
|
|
|
|
by kajman
46 days ago
|
|
I've bounced off learning (hobby-tier) Elixir a few times now. For me, the gradual type system combined with the functional flow has been hardest to wrap my head around when it comes to solving problems. I'm curious about how you approached handling a lower-level protocol in Elixir. When you began implementation, did you start thinking at the level of packets as structs, or maybe first as just maps that flowed through functions? |
|
Grab a buffer, make sure it's at least as long as BHS, shove into BHS, ok, make sure it's at least as long as what the BHS requires...
Pattern matching is the hidden power of Elixir that's probably the hardest to get fluent with, it's IMHO harder than Rust's equivalent (because of gradual typing!) - but when it works it blows Pythons' match syntax way, way out.