How difficult would it be to add the infix notation à la Haskell?

That is simply pandering to familiarity - in the hopes of gaining popularity.

It is harder for many people to understand

Have you actually pondered why that is? My hypothesis is that we are taught operators before functions - so we get used to operators before functions. But once you understand functions (something applied to a list of data) the notion of operators becomes superfluous (obsolete?). Yet we hang on to it even though it may be an idea who’s time has passed.

We are not RPN calculators

  • That’s postfix
  • It makes sense in the context of a stack based architecture
  • Ultimately our brain is a pattern matcher
  • When patterns change we have to adapt
  • The root of the problem: we hate different, we hate change

state = [a: 1, b: 2] |> Enum.into(%{})

As per style guide that is a no-no. And even pipes aren’t a universal panacea anyway.

4 Likes