Has there ever been an proposal for a way to modify JavaScript prototypes only inside modules where it's explicitely declared? Basically as in Kotlin Extensions?
http://kotlinlang.org/docs/reference/extensions.html …
Is there an obvious reason this would be a bad idea?
@wycats @domenic @bterlson
-
-
Incidentally, Ruby's "refinements", which are this feature, are pretty static but could have been more static (and would have been better for it).
-
Static sounds good from the VMs perspective. Not sure how useful that is in the JavaScript world tho.

-
If it's not static, it becomes very hard to understand. I participated a lot in the Ruby version of this conversation and became very convinced that the feature is more useful when static because it can be understood more easily.
-
I can't really speak to that since I don't have the same background as you have, but I find your argument very convincing.

-
In cases where user intuitions align with implementation considerations, you can build some awesome shit that isn't slow. I love finding those corners.
-
Constraints are liberating!
-
They can be yeah!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.