So having unrelated objects all get a method that they might not wish to have added to them is ok with you?
| [reply] |
| [reply] [d/l] [select] |
I have to agree with diotalevi on this: there is no good reason for this to be done through UNIVERSAL::. It's just a simple utility method. It does not need to be added to every namespace automatically.
| [reply] |
Ok, fine, I guess. What's also missing is that there's no need to implement this with UNIVERSAL:: pollution. This could have just been a "smarter" use and require function named something appropriate and it wouldn't have caused issues for other objects. I have sympathy for features that are best (or perhaps only) implemented by polluting UNIVERSAL:: but this isn't one of them.
| [reply] |