|
|
|
|
|
by fenollp
2852 days ago
|
|
IMO Erlang needs Elixir’s `|>` and `with` pipes. I voiced my opinion on the ML and kind of started working on it!
I need https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-639 fixed first. I find Erlang a harder tool to shoot yourself with than Elixir yet there are definitely some things it could improve on, and not only at the language level (always running xref on compilation would be nice). |
|
For those who are not familiar, in Elixir you can write
and that is equvalent to IO.inspect is a function that will fork a copy of its passed parameter to stdout, pretty-printed, and pass its parameter as the sole result.so if you wanted to check on on the values you can do this:
This makes "println debugging" super, super, easy, because post facto cleanup doesn't require rebalancing your parentheses.