4 ms·
The simplicity and power of Elixir: the ws2048 case
- vezzy-fnord 11y agoI spent most of my time getting into its vision and philosophy, trying to distance from the object-oriented mindset that my previous studies and experiences had consolidated. Which would be somewhat off the mark in Erlang. Control flow and common interfaces are frequently expressed via adapters written using polymorphic pattern matching functions. Processes are message-passing, isolated units of work. Modules and OTP applications are encapsulation, etc. The functional aspects aren't as important as the pattern matching on data types.
- RickHull 11y agoI don't follow. What in the quoted portion is off the mark? I don't see any contention between the quote and the rest of your comment.
- jmcgough 11y agoI started digging into Elixir on Columbus Day and was excitedly telling friends about its features after a few hours of tinkering. Extremely cool language that forced me to think and approach problems a little differently (pattern matching is awesome!)
- vvanders 11y agoOne of my favorite things with pattern matching in Elixir is how you can use it to trigger off of sections of the AST when building macros. Hundreds of lines of gnarly tree walking down to a single function prototype, it's incredibly elegant.