So, I have seen rails code and I did not fall in love with the code. Instead what I saw just black magic and all sorts of conventions. Reminded me of perl. You have to invest a lot of time knowing all the magic stuff.
There isn't much black magic. Most of it is pretty sane naming conventions which could be OK in any sw project, plus database schema autodiscovery. The bonus is increased maintainability.
They are talking about adding some optional type inference in Ruby 3.0. See the rejection comments of https://bugs.ruby-lang.org/issues/9999
This is the most stong typing I'll accept for Ruby. There are plenty of other languages if strong typing is important for a project. They usually look bad (not because of strong typing) but if one really needs them...
As someone who is just learning Rails [1], I can definitely empathise with the "black magic" comment.
Some of the stuff it does is pretty much voodoo to me at this point. But - it's voodoo that makes me think - even say out loud to myself, sometimes - "wow". I can see how it's amazing that it does what it does with so little code. I can see how this is an enormous benefit to getting a project up and running. I can see how it'll potentially save me hours and hours of configuration.
That's a great benefit, but it comes at the cost of understanding. What exactly is that line of voodoo doing? I dunno. How do I troubleshoot it if it doesn't work? I dunno. Like, I have no idea.
[1]: As the first real "language" I'm trying to actually properly learn, so take my comments in that context. I am not already an experienced coder. I want to be able to knock up little projects, proofs of concept, in a reasonable amount of time. Rails, to me, seems like the framework that will allow me to do that. We'll see.
newsat13 wasn't complaining about using conventions. newsat13 was complaining about how Rails uses black magic with conventions.
I can't speak to Rails, but I've worked in other codebases that used reflection to dynamically attach different pieces of code together. It was hard to trace code because I couldn't do a search for the value being generated nor could I use the static analysis to find the value. I had to manually trace through the whole stack to find the bit of reflection that was generating a value.
I've never worked in a codebase like that, but in all my years of helping people with Ruby and Rails I've concluded that reflection is a code smell. It's one of those things that is taught in CS and winds up appearing where conventions might not have been immediately apparent, a fallback to training.
> So, I have seen rails code and I did not fall in love with the code. Instead what I saw just black magic and all sorts of conventions.
Right, so clearly Rails is not for you. No harm no foul.
This is essentially the point of rails, that I as an engineer don't care enough about those details, because I need to get something working quickly. if it gets to a point where it matters (because it actually does, say, when you're trying to scale) you can invest the time to learn how it all works and either improve it or say ... "you know what, I think we should ditch this entire thing"