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.
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.
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.
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.