Re:Functional Programming in Elixir with Witchcraft
by pmontra on Wednesday February 09, 2022 @01:48AM
(#30269715)
I appreciate the honesty of the author
> Unfortunately, Elixir isn’t really built for writing code like this. Therefore, using Witchcraft can also result in:
> A certain amount of unnecessary ceremony
> Performance penalties
> Angry stares from people that read your code
The first point really bothers me. I hate writing boilerplate and I would use Haskell (which I don't know) if I really liked that kind of code (and types.)
I was rolling my eyes when I was reading %Algae.Either.Left and Right in the code examples. That's in part because I'm not familiar with those concepts (see point 3) and in part because it lowers the signal to noise ratio.
The second point could be important but generally is not or I'd be using Go, Rust, C++.
The third one does not apply if all the team agreed to use Witchcraft. If they didn't, you'd better stick to plain Elixir or deserve those looks.
> Unfortunately, Elixir isn’t really built for writing code like this. Therefore, using Witchcraft can also result in:
> A certain amount of unnecessary ceremony
> Performance penalties
> Angry stares from people that read your code
The first point really bothers me. I hate writing boilerplate and I would use Haskell (which I don't know) if I really liked that kind of code (and types.) I was rolling my eyes when I was reading %Algae.Either.Left and Right in the code examples. That's in part because I'm not familiar with those concepts (see point 3) and in part because it lowers the signal to noise ratio.
The second point could be important but generally is not or I'd be using Go, Rust, C++.
The third one does not apply if all the team agreed to use Witchcraft. If they didn't, you'd better stick to plain Elixir or deserve those looks.