3 ms·
Things to avoid in Ruby: Ruby.
by ARandomerDude 2y ago
Things to avoid in Ruby: Ruby.
- AtlasBarfed 2y agoThere are many things I like about Ruby, but almost all of them are in Groovy. Ruby produced some of the best light-config or code-as-config software I've ever seen, and thankfully forced many aspects of Java's XML-SOAP-boilerplate problems to be finally addressed and thrown out. But Groovy has static types and a legit JIT on the JVM with @CompileStatic. I agree very weakly with a lot of the contentions in the article because they are also major language advantages Groovy has (or had) over straight Java, but it is deck chair rearranging. Ruby has had problems with performance and the usual problems with type-light scripting in large codebases. I don't know how good Ruby IDEs are, but fundamentally it has to be challenging to know what type and methods can be called on something being returned from a ruby expression, although it is amazing what Javascript IDEs can do with type inferencing so what do I know. Groovy is a dead language though, killed by Kotlin, and Ruby is getting destroyed by Python.
- darkmarmot 2y agoA lot of Ruby devs moved to Elixir.
- vundercind 2y agoIs Elixir popular among Ruby fans or Rails fans? I really like ruby, kinda hate rails, and did not enjoy my one experience working in an Elixir codebase and haven’t managed to figure out why it keeps getting likened to Ruby.
- pmontra 2y agoI used Elixir for a few years in a Phoenix project, after and before many Rails projects and in parallel with a couple of Django ones. There are things I really like about Elixir and I wish I had them in Ruby. I never thought about using Elixir for everyday scripting, I'm using bash or Ruby for that, sometimes Python. Elixir is a big projects language for me, much like Java. Too much boilerplate for tiny things. Phoenix vs Rails, even level. Both trump Django from very far above.
- halostatue 2y ago23 year Rubyist here (and programming polyglot; I’ve shipped in 35+ languages or language dialects) who uses both Ruby and Elixir regularly. I prefer to avoid Rails (it’s not bad, but it’s overkill for most things I need). The Elixir language has some superficial resemblance to Ruby which helped with language acquisition 8 years ago or so, but it is very much its own thing. The resemblance is unsurprising given José Valim's background with Ruby and Rails itself. Most of my quick scripts end up being Ruby, but I prefer to think in Elixir (mostly for pattern matching) or Typescript (for structural typing). The libraries I maintain in the Ruby community support much older EOL versions of Ruby, so I haven't been able to adopt new syntax like pattern matching for much.
- zarzavat 2y agoRuby is fine for small projects by a single developer, anything that you could reasonably do a total rewrite in a day or two. Because the main way of refactoring is via rewrites. As a language it is completely unsuitable for large projects, the dynamic features that are helpful at a small scale become liabilities at a large scale. Ruby’s main flaw is the excessive exuberance of its fans, you wouldn’t develop a large website in bash, you probably shouldn’t do it in Ruby either, but each of the languages still has its own charm and is useful for the things it was designed for.
- lta 2y agoI've worked on multiple large Ruby codebases with many engineers contributing (ex: meta). There are many large Ruby projects out there, your one-developer-language opinion is simply not supported by facts
- herbst 2y ago> Because the main way of refactoring is via rewrites. Not sure where you are getting this.
- rezonant 2y agoThings to avoid: Whatever programming language you are currently using. This sort of "language/tool/framework is a dumpster fire" post is not helpful or curious. Every tool has its flaws and places where it excels. Painting with broad strokes ignores nuance and implies a lack of familiarity with why the tool gets used. Besides, PHP exists (/s)
- celdon25 2y agoWell said, a lot of people just don't get it.