Strategies for standardizing mistakes

Jason Orendorff jason.orendorff at gmail.com
Thu Oct 15 09:29:18 PDT 2009


On Wed, Oct 14, 2009 at 7:04 PM, Jim Blandy <jimb at mozilla.com> wrote:
> One could characterize the difference by saying that Mozilla has "reluctant
> properties" whereas WebKit has "reluctant values".  :)
> [...]
> It could just be organizational bias, but reluctant properties strike me as
> the more bounded form of insanity.

I agree with Maciej. To summarize his point:

<script>
alert(!function () { return document.all; }());
alert(!document.all);
</script>

Two different results in Firefox. Beta reduction is broken in JavaScript.

(It's broken anyway for expressions containing `arguments` or `this`,
but those are statically visible.)

"Reluctant properties" are, I think, impossible to specify sanely. If
they can be specified, I'm still not sure they can be implemented
correctly. Our implementation looks at the bytecode; I wouldn't wager
that the correspondence between that and the original syntactic
context is 100% sound. I sort of doubt that everyone who touches the
compiler is even aware of the constraint.

-j


More information about the es-discuss mailing list