2 ms·
Ehhh I’ve autoloaded lib for like 10 years and never experienced any of the problems the author says that arise from doing so.
by rco8786 3y ago
Ehhh I’ve autoloaded lib for like 10 years and never experienced any of the problems the author says that arise from doing so.
- buf 3y agoYep - me too. Don't know what the author's on about.
- inopinatus 3y agoMe neither, there’s some too-clever-for-it’s-own-good metaprogramming that enthusiastic Ruby devs sometimes indulge in, such as private inner DSLs, or baroque/arcane dicking around with eigenclasses, prepends, anonymous modules etc, that could certainly blow up spectacularly when part of the application code, and should either be extracted to a standalone gem or reconsidered entirely. Having shat out such over-engineered malarkey myself on occasion, I will say, there but for the grace of gods go I.
- grncdr 3y agoOnly ~6 years instead of 10, but I’m also not really sure what the problem is with autoloading lib. The only concrete problem I’m aware of is the presence of lib/tasks creating a Tasks constant. However I’d argue that lib/tasks (like so many other Rails-isms) is a poor choice that’s become enshrined as a holy convention.