3 ms·
I feel the same way. Elixir users keep banging on the macro drum but most Erlangers don't want them. I can read any Erlang program I wrote 10 years ago with ea
by rlander 7y ago
I feel the same way. Elixir users keep banging on the macro drum but most Erlangers don't want them.
I can read any Erlang program I wrote 10 years ago with ease. I have difficulty understanding a small Elixir project I wrote just a few months ago.
- pmontra 7y agoThis is subjective. I never wrote a macro in Elixir after two years of being paid to work with it. I remember I studied Erlang in 2010 and I was like "great concepts but the syntax is horrible, no wonder it's very niche." I never wrote anything with Erlang but I can read it. I looked at Elixir when it was at one of its early versions and I could immediately work with it. I wrote some code and eventually got a customer. This could be affected by my background. My trajectory is 99% in the imperative set of languages. BASIC in the 80s, a little COBOL and Pascal, a lot of C and Perl, some Visual Basic, a few PHP, a little eLisp, some Java, a lot of JavaScript for the web but mostly Perl until I picked up Ruby on Rails in the middle 2000s. Some Node and some Python until I got a customer with Django. I'm mostly work with Elixir, Python, Ruby and some React now. I script in Ruby for myself. The Python ecosystemis for the web looks complicated by design (but simple compared to Java), Elixir is OK for large projects, too cumbersome for small ones. I sincerely dislike the syntax of GenServers (this would need a blog post) and Ecto is unnecessarily complex and a productivity sink. But the Elixir and Erlang way to pattern matching is heaven.
- dnautics 7y agoAlmost no one writes macros in the elixir ecosystem though, only the biggest players (phoenix, ecto, exunit). I have no problem reading my elixir code from a year ago. The erlang otp tftp module, by contrast, is indecipherable, with three layers of module indirection I had to fight against (there was a fatal bug with a misspelled atom that I couldn't trace the code path to). In the end, I just wrote my own tftp.