4 ms·
I've thought about this too. C libraries usually have sensible prefices though, e.g. curl_, and if not a man-page. So for C specifically I don't have this issue
by notemaker 5y ago
I've thought about this too. C libraries usually have sensible prefices though, e.g. curl_, and if not a man-page. So for C specifically I don't have this issue.
Ruby though... I really hate it. Overloading on numbers for example. Which module lets you do 5.some_verb? Where did you import it?
In python and C you have imports local to the file or included headers. In ruby it doesn't matter as long as it's been imported somewhere in the same runtime??
Absolutely bonkers.
PS: I am quite new to ruby so please enlighten me if I have it all wrong :)
- daemin 5y agoI think that's a key trade-off in duck typing and reopening classes and objects. You get immense power to do "cool", powerful, and useful things like that, but at the cost of debug-ability. It's been a while since I really used Ruby in anger but to discover where these things came from you need to just look up the documentation of your dependencies and their dependencies, and see where something got added to. For me most of it came from ActiveSupport, and I ended up using that library by itself in other projects than just Rails.
- notemaker 5y ago"you need to just look up the documentation of your dependencies and their dependencies" Exactly, which seems directly opposed to the Ruby ethos of happy developers. I do appreciate the magic of having stuff like 5.bytes or 8.days, but I don't see the reason for having runtime imports or at least warnings that you're using modules required elsewhere.