It's very easy for prepack to apply the "un-mutated let binding" optimization and I really hope you do.
-
-
It’s not that easy. Nothing is safe from side effects it seems. The only somewhat safe thing is strict type annotations
-
What exactly is not easy. Are you referring to use of direct eval? Or something else?
-
Global side effects, eval, getters/setters, proxies etc.
-
How can global side effects, getters/setters or proxies affect the analysis of whether a let-bound variable in a module is ever mutated?
-
I wasn’t talking about mutating the binding, rather the object the binding referenced.
-
Right. I'm saying you can easily apply an optimization that treats un-mutated let bindings as const and should.
-
You wouldn't apply that optimization in the presence of direct eval, which is static.
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.