Hacker News new | past | comments | ask | show | jobs | submit login

My mind instantly darts to the combination of piping + pattern matching.

Edge cases can live as two line adjustments in ways I don't know how to do in any other language.




Worth noting that the concepts of piping and pattern matching don't just exist in the language itself, but also in an architectural level. Plugs, for example, allow you to "pipe" entire web requests in a very elegant and logical fashion.


Couldn't have answered the question better/more succinctly myself.

When I'm working on the JavaScript (front end) side of an Elixir project, I repeatedly get into these positions where I'm thinking, "Man, I could express this so succinctly and elegantly in Elixir. There's no way in JavaScript that doesn't feel clunky in contrast."


That makes sense. For a period of my career I did some Prolog and always liked the way pattern matching allowed you to write extremely descriptive code.

Funnily enough, I think pattern matching is one of the most exciting things to happen in Ruby for a long time. While it isn't on a par with functional pattern matching it's still going to be incredibly useful.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: