5 ms·
> I’ve tried python, but I end up having to deal with the mess of importing modules It's funny, the fact that Ruby doesn't have a facility to import modules is
by dudeinjapan 5y ago
> I’ve tried python, but I end up having to deal with the mess of importing modules
It's funny, the fact that Ruby doesn't have a facility to import modules is one of my biggest gripes with it. Instead of importing into a specific scope, the global namespace becomes a dumping ground for anything that has ever been loaded, and you need something like Zeitwerk to do auto-loading for you. Which I guess can be seen as a convenience initially, but it makes things harder to manage as your app grows in complexity.
- regularfry 5y agoI have mixed feelings about autoloading. I never use it for my own stuff, ever: explicit `require`s all the way. But I do appreciate not needing the boilerplate in Rails. It would have been nice to be able to do something like: `MyActiveRecordImport = require('activerecord')` to take control of the constant name, but honestly it's not something I hugely miss.