I completely agree with the consistency argument, maybe I should have explained where my question comes from first.
I also want to say that my question was genuinely how difficult would it be.
I wasn’t asking to vote for the addition to the language anytime soon.
I’m working right now in a large company where a lot of the new hires are data scientist, with mainly a physics or statistics background, not a computer science one (so… no Lisp, no S-expressions).
They use Python a lot, in a very bad way.
One of the problems of Python is exactly inconsistency, everything can be done in at least two ways and both of them are equally correct.
Of course everyone tend to mix the two ways as they please.
I’m writing Elixir and Erlang code for them, I sold them the BEAM with the fault tolerant and easy concurrency arguments, but now I need to teach other people to interact with the code, and I’m having some difficulties (more than I anticipated) getting the new guys to grasp all the concepts, not just the language(s).
They also know quite well
R, which is a kinda complex language, they are smart, but too much is different from what they already know.
I’ve started looking for a way to write Python differently, just for the purpose of getting them used to the functional paradigm in Python, so I showed them Coconut lang.
They immediately thought this is better for pattern matching, not so much for the
Coming from their background
f(g(x)) (and also of course
(f (g x))) makes sense,
x |> g |> f not really, while they had no problem with the infix notation and that’s when it clicked, there are many occasions where the two are swappable (and many others where it would simply be wrong).
So i started wondering if there was a way to make the transition smoother.
That is simply pandering to familiarity - in the hopes of gaining popularity.
Which is good and it worked great.
You can still write
Kernel./(Kernel.+(some_num, other_num), some_other_hopefully_non_zero_num)
some_num |> Kernel.+(other_num) |> Kernel./(some_other_hopefully_non_zero_num)
if you want.
But it’s scary too look at.
And it also starts a wave of new questions:
Kernel.+(10, 5) but not
And why the unary version works both ways
Kernel.+(10) == +(10)?
The root of the problem: we hate different, we hate change
That’s exactly what I was trying to avoid: change everything at once.
As per style guide that is a no-no.
Believe me, if I asked the question is because, and I’m quoting you,
Ultimately our brain is a pattern matcher
once people start to see a pattern emerge, they’ll use that pattern everywhere, even when they shouldn’t.
And that’s how the bad ones are born.
I noticed that often a good looking pattern works better than forcing people to read a style guide or use a linter.
In the end, I’m sure eventually they’ll get there, even without the infix notation
Thanks for the discussion.