3 ms·
Sometimes it's good, and sometimes it's not. I find that the language has a lot to do with it. At some point I was doing some modifications to Rails 2.0 inter
by caffeine 17y ago
Sometimes it's good, and sometimes it's not. I find that the language has a lot to do with it.
At some point I was doing some modifications to Rails 2.0 internals (the public APIs to these sorts of things never expose the needed functionality) and I found it pretty much impossible to predict when something would get executed (if at all).
Figuring out how Rails is wired demands serious spelunking. Forget reading. You invariably need to get out the profiler and browse call graphs, and then shotgun-pepper the code with thrown exceptions to see where in the stack they come up - and this is just to figure out how it's put together. (Hint: a template handler in Rails 2.3 gets called 32 stack levels deep, at least two of which are a benchmarker).
I think this has much to do with all the "magical" stuff, so it might be particular to Rails - but I also think that the easy power of the language gives programmers a lot of rope to hang their readers with.
I wonder if an easier, "fun" like Ruby language makes people cavalier about setting up crazy structures, whereas "difficult" languages like C++ make people a bit conservative - the language is complicated enough, so why make it worse with crazy design?