3 ms·
>I'm curious if this namespace mechanism could, say, isolate monkey patches. Wasn't that the purpose of refinements? Perhaps I am misremembering, because I nev
by chao- 1y ago
>I'm curious if this namespace mechanism could, say, isolate monkey patches.
Wasn't that the purpose of refinements? Perhaps I am misremembering, because I never had a need to reach for refinements myself.
- vinceguidry 1y agoYou still need to rely on the library maintainers to use them. This mechanism allows you to sandbox a library that doesn't.
- psychoslave 1y agoOk, understood. This being into account, would it not even better to make the most obvious way to code some logic most likely shaped without this issue in the first place. Because, if the external dependency smells that bad, what the root cause? If that is crap code produced thus for some reason (unskilled/over-time-bound-pressured person for example), then probably this is better to avoid using this code altogether. And if this is instead because the language encourage easy path with bad outcomes, then it might make more sense to make a proposal with a facility to instead make the path of least resistance be something of more enjoyable outcome.
- vinceguidry 1y agoProper namespaces are a good thing to have regardless. Relying on gem maintainers to not pollute the main namespace was always suboptimal.