Re:Responsible Monkeypatching in Ruby
by kryptiskt on Friday August 27, 2021 @06:51AM
(#28326219)
Funny thing, that construction is actually pretty easy to achieve in buttoned-up and statically typed C# with extension methods:
[ Parent
| on HN ]
Not bad! I also feel like it’s worth mentioning that in rust you can extend primitive types with traits. I’ve done that to add some bit-munging helpers while working on a toy Game Boy emulator to make it easier to deal with 16- and 8-bit register values like (8, 8).join() and (l, h) = 16.split().
Re:Responsible Monkeypatching in Ruby
by joelbluminator on Friday August 27, 2021 @10:32AM
(#28328286)
I'm impressed actually.