Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jypie
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
jypie
12y ago
Oh, I failed to remember there was Object.freeze(). This is something the interpreter(Just-in-time compiler, to be more exact) would utilize as hints. but does this mean Immutable.js does Object.freeze()? and if so, why do we need a new lib
2.
▲
by
jypie
12y ago
I'm afraid I don't get your point. So deep copy is expensive, and if the variable is immutable and has to be changed, it would have to be deep copied. so immutable is bad? Or are you trying to say even if it's expensive, the
3.
▲
by
jypie
12y ago
What is the benefit of having immutable variables that are just fake-built at runtime? At compile time, knowing some variables are constant and will not change would give the interpreter/compiler a lot of optimization chances but does
4.
▲
by
jypie
12y ago
This. I was thinking the same.