3 ms·
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 collis
by matsemann 5y ago
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).
- modal-soul 5y agoRuby's refinements sound somewhat similar; they let you scope your monkey-patches.