You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In second example JavaScript implementation can't know statically whether getString() will return string, but it will now when it will get to it. This is actually better than :: cause you can polymorph:
The key idea is that extension is lexically scoped so that it won't affect any random code. Also, you most surely will want to import/export this extensions so my primitive syntax might not work, but this is only syntax issue.
It could be done dynamically like:
In second example JavaScript implementation can't know statically whether
getString()
will return string, but it will now when it will get to it. This is actually better than::
cause you can polymorph:The key idea is that extension is lexically scoped so that it won't affect any random code. Also, you most surely will want to import/export this extensions so my primitive syntax might not work, but this is only syntax issue.
There are actually a corresponding feature in ruby 2.0 and a perl module for this.
The text was updated successfully, but these errors were encountered: