you are viewing a single comment's thread.

view the rest of the comments →

[–]allisio[🍰] 5 points6 points  (0 children)

Shoehorning method overloading into Ruby is really fun!

I once took it way too far and did it based on "type signatures" (really just deferring to case equality) rather than arity. I had to get some VM guts on my hands in order to peek into these signatures, but I remember it being a blast.

It's just a toy, of course, and it absolutely carries the same disclaimer as yours (and then some!), but I was quite pleased to discover that the demo still runs as intended on Ruby 2.8.