3 ms·
I've been looking at Elixir more and more over the last few weeks since it seems to incorporate many of the things I find lacking in Python. So far the only rea
by mkohlmyr 12y ago
I've been looking at Elixir more and more over the last few weeks since it seems to incorporate many of the things I find lacking in Python. So far the only real hurdle was that I found the introduction text a little obtuse when it came to Mix and OTP (I'm often slow to get through introductory guides, since I'm a learn-by-doing person).
Would love to hear from other people who have come from a JavaScript / Python heavy background what their experience has been with the language. Or from people who do web development in general if they feel its a good fit.
- untothebreach 12y agoI come from a javascript/python background, you might want to take a look at the Phoenix web framework[1], as it will give you a good introduction into the language, but also introduce some new concepts (OTP-wise) that will help you think more "elixir-y" (or "erlang-y"). One thing I constantly keep in mind when programming in Elixir is that, using it in the same way you would use Python is a waste. For example, when I use Python, I'm not typically thinking of concurrency (outside of, "how many gunicorn workers will I need?"), because of the situation with concurrency in Python. Using Elixir (or Erlang), you really aren't taking full advantage of the language/runtime/VM if you don't take concurrency into account. If all you want to do is a little string munging, you can do it in Elixir, but it is probably not the best tool for the job. The Mix & OTP guides available on elixir-lang.org are great, but if you want more information on OTP, the OTP chapters in "Learn you some Erlang"[2] are wonderful. You will have to do some translation from Erlang syntax to Elixir, but it is a great way to learn how to think concurrency. 1: https://github.com/phoenixframework/phoenix https://github.com/phoenixframework/phoenix 2: http://learnyousomeerlang.com/content http://learnyousomeerlang.com/content
- mkohlmyr 12y agoPoint well taken as far as concurrency, really reading up on GIL along with working a lot with SOA is part of what is informing my desire to find a more appropriate language. I want to become more proficient in developing web services that scale, as well as expanding my mind somewhat by working with a different model / from a different perspective. I will have a look at the links, for sure. Thanks!
- rubiquity 12y agoI was primarily a Ruby programmer so before I dove into Elixir I mostly wrote Sinatra and Rails apps, and occasionally some Node.js. When I first came to Elixir I mostly approached it as a fun thing to do in my spare time. The language really has some great features for solving problems in concise ways. But as I've spent more and more time with the language I've started to realize it can replace far more of the projects that I used to use Ruby for than I first though. I've worked on a couple projects in Elixir already. I do still like Ruby/Rails for rendering HTML (there's years of hard work in making that an easy thing to do in Rails), so a common web app that I create lately will be Rails as a very thing wrapper around the database for rendering HTML and then an Elixir component for background jobs and WebSockets. That said, a ton of great work is going into Phoenix[0] and I think it's very close to being suitable for both rendering HTML and WebSockets. On my next project I'll probably try and just use Phoenix entirely. 0 - https://github.com/phoenixframework/phoenix https://github.com/phoenixframework/phoenix