3 ms·
ActiveSupport is a core part of Rails though.
by anandvc 5y ago
ActiveSupport is a core part of Rails though.
- steve_adams_86 5y agoI think this is the author's take on that: https://solnic.codes/2022/02/02/rails-is-not-written-in-ruby/#but-many-methods-from-activesupport-are-now-in-ruby https://solnic.codes/2022/02/02/rails-is-not-written-in-ruby... Not sure this is what you're getting at. I agree with the author though, this aspect of Rails bothered me quite a bit. Knowing that working on a Rails project meant I could magically generate ranges from dates because of ActiveSupport was unsettling - it made me wonder what else was non-native behaviour and waiting to trip me.
- jon-wood 5y agoI just can’t bring myself to get worked up about it - I’ve done a lot of Rails, and I’ve done a lot of pure Ruby. You quite quickly learn which bits come from ActiveSupport when you step outside Rails because… it doesn’t work. It’s not going to trip you up in 8 month’s time after shipping your code, you’re just going to get an exception when you first try to run it, and then either implement it the pure way or add a dependency on ActiveSupport.
- steve_adams_86 5y agoThose are good points. I should say it's not really ActiveSupport that concerned me the most so much as the possibility of other people on my team monkey patching stuff in a similar way, but with much lower quality code. It's almost like all the common dangers of bad programming exist, plus a bunch more at a lower level. I totally recognize that it's also a strength of ruby. I really enjoyed working with it. It's super expressive and clear to read. ActiveSupport is all really well documented and designed too, and I'm not trying to criticize it. After re-reading my comment I'm noticing I was specifically targeting Rails as well. I think if anything Rails does a great job and shows why this is a cool thing about ruby. I think what I should have said is that this aspect of ruby is what I found off-putting and specifically in a context where I'm relying on a vast number of dependencies, coworkers of various skill levels, and shipping code to customers. Does that make more sense? I didn't express what I was thinking very well before.
- jacobsenscott 5y agoThere's nothing magic about it. It is just ruby. And no need to wonder what else is there. It is all documented. All the methods are well named. It is hard to see how they could trip you up. I've been programming for a long time now. I remember when people would read the documentation for the libraries and frameworks they were using. Seems to have fallen out of fashion.
- steve_adams_86 5y agoI read the docs, and I thought it was all well designed too – the issue I took with it is that Ruby is so incredibly dynamic that it looked like a giant foot gun to me. Well, potentially at least. I know it's powerful in the right hands. I'm a lot happier with something like Rust, and it arguably comes down to personal preference. Ruby is awesome and fun to write. I'm not a good enough programmer to make it as productive as others in the long term though, especially when working on a large team.