ben at
The release of #Ruby 2.2 sees the addition of refinements, a less invasive way of monkey-patching.
http://ruby-doc.org/core-2.2.0/doc/syntax/refinements_rdoc.html
http://ruby-doc.org/core-2.2.0/doc/syntax/refinements_rdoc.html
I've used Ruby refinements in my own code, yet I find the name 'refinements' less memorable than monkey-patching. Perhaps 'local monkey-patching' is a better definition than 'refinements'?
Ah, naming things: on of the hardest things in programming.
Refinements do exactly that to me; an after-hook to a method rather than slapping a re-written definition over the top. Of course monkey-patching relates to duck-typing, which I agree are memorable names but not particularly descriptive.
Refinements do exactly that to me; an after-hook to a method rather than slapping a re-written definition over the top. Of course monkey-patching relates to duck-typing, which I agree are memorable names but not particularly descriptive.
Refined monkeys seems like a description of programmers to me...
SombreKnave at 2015-05-14T18:58:08Z
ben likes this.