stratacast

stratacast

I don’t really know how to frame this because I’ve never used Ruby, or Rails, or even looked much into them. I have been avidly working with Elixir these last couple months, and was exposed to it some time last year. So this question comes from complete ignorance of any of the Ruby world.

To my understanding, Elixir is to Ruby as Phoenix is to Ruby on Rails. Is this assessment correct?

The reason why I ask is because in my company there is an interest in Erlang/OTP but no interest in Elixir because Elixir == Rails. From my time in Elixir and my reading, that does not seem correct. However, I want to provide accurate information. When I look at comparisons, pages come up doing comparisons according to my original assessment. I don’t understand the disdain for RoR, but in the applications I’ve been working on, Elixir has been an incredible language and I want to show that Elixir is worthy of consideration (though there really wouldn’t be anything wrong per-se going with raw Erlang)..so in relation to all this, is there a reason why someone who would dislike RoR also dislike Elixir? Syntax aside, since apparently Elixir has a lot of Ruby syntax influence.

Showing Posts 30 to 21

silverdr

silverdr

The only thing I’d add to this is that this kind of behaviour I’ve seen mostly from people who don’t actually know or understand the thing they use as a negative label - in this case Rails. Wouldn’t be much surprised if this was the case here too.

dimitarvp

dimitarvp

There has been good amount of people coming here after they’ve read severely misinformed blog articles (which have been thoroughly debunked shortly after they were written). The problem with this is like with TV series like “Ancient Aliens” – people just read/listen and believe everything that is being sent their way.

Phoenix is practically one of the smallest web frameworks I’ve ever seen and I programmed in 5 high-level languages for 10+ years. Really weird that somebody would conflate it with Elixir. They likely think that Phoenix is to Elixir like Rails is to Ruby – which is very far from the truth.

That’s just the thing. Even a Phoenix controller is pure Elixir – it’s just a module that follows a few conventions.


I believe this thread started going in circles though. Not sure we can say anything extra that would add to the facts that are already known?

Cochonours

Cochonours

I think so too. Only the fact that Elixir is faster than Ruby is on topic.

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

This should perhaps be moved to its own thread?

brightball

brightball

Might be worth writing a “No, Elixir is not like Ruby” blog post

stratacast

stratacast OP

In my conversations, the complaints have been around simply a hatred towards the design of Rails. An appreciation for Ruby, but Rails was like sour milk to them (not sure why, probably in the design). My colleagues are quite pragmatic about why they choose X or Y. So I wouldn’t say with them it’s about snobbery at all. I think there is blurred thinking between Phoenix and Elixir itself, and that’s where the problem is. If there was a time where they decided to hop languages and chose Erlang over Elixir, it would be no big deal, but I’d hope they’d take a fair look at Elixir without preconceptions of it. So, my code today likely is a good model, and also one reason why I chose not to build it with Phoenix. So that pure Elixir can be seen.

Cochonours

Cochonours

Not just harder, it often makes it impossible. How do you argue about old languages like Java producing programs 2 to 3 times slower on average than Rust (a language still in its infancy) equivalents? Surely Java, being waaay older and adopted by so many corporate behemoths, should have the advantage with its super optimised compilations backed by thousand of doctorate thesis. Something just doesn’t add up.

hauleth

hauleth

Yes.

No. It mean that language specification makes it harder to have efficient implementation, but nothing prevents you from writing x86 byte code interpreter in Elixir making x86 assembly at most as fast as Elixir.

brightball

brightball

This is accurate and it’s both a strength and weakness of Ruby. Ruby is a malleable language and Rails (at least early on, I don’t know if this has changed) actually modifies the language itself to make it friendlier for web development. Adding functions like .blank? to the root string object is a simple example so you can say " ".blank?.

On one hand, this is a super power. I can inject a function directly into the root String object and make it available everywhere (or change behavior everywhere) without having to fight the entire inheritance tree. This is especially valuable when dealing with 3rd party libraries, both for adding quick fixes without having to fork/branch the entire library while you wait for a PR to be approved…and for making 3rd party libraries easy to use because they can easily inject themselves at the appropriate places within your code base. It’s the closest thing to workable Aspect Oriented Programming I’ve ever encountered. When dealing with huge inheritance trees in OOP, the ability to fix something at level 3 without having to rework the entire hierarchy is awesome. There are, of course, many trade offs and negative consequences to it as well.

Elixir doesn’t do anything that you don’t tell it to do. It’s more explicit. The functional paradigm also entirely avoids the OOP hierarchy entanglement where such approaches are beneficial. When you don’t have to worry about a function call transforming a value that you can’t see, hidden within a stateful object, the functional approach simplifies explicitly calling everything and leads to much easier long term maintenance.

Cochonours

Cochonours

Languages features have implications on their implementations speeds. It follows that languages do have speed.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews