3 ms·
Sometimes I want partial application and other functional paradigms... to reduce LOC by 90%
by reeaper 3y ago
Sometimes I want partial application and other functional paradigms... to reduce LOC by 90%
- adregan 3y agoI’m currently in the process of picking up elixir. When you say partial application, are you referring to the use of the capture operator `&`?
- pdimitar 3y agoNot your parent commenter but likely they at least partially meant that, yes. Though that alone can't reduce LoC by 90%. Elixir is just incredibly terse and no-bullshit language in general. All the shorter code idioms together make for a readable and to-the-point code.
- reeaper 3y agoBad explanation from a noob (me), but basically yes. Functions just always fit together and I don't need ugly sprawling interfaces or pointless declarations of nearly identical functions. In Elixir when I want to pass a function with 3 arguments into an interface that expects 4, I can do something inline with no extra boilerplate like func(&1, &2, &3, <a default 4th value to be used in each invocation>)