Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
matsemann
· 5y ago · 0 comments
What's nice about extension functions in Kotlin is that they are statically imported. So you're not really modifying the class, and there is no danger of collisions (like it was when people monkey-patched javascript built-ins back in the day).
Comments
[–]
modal-soul
5y ago
Ruby's refinements sound somewhat similar; they let you scope your monkey-patches.