On May 28, 2008, at 10:38 PM, Pratap Lakshman (VJ#SDK) wrote:
I have uploaded to the wiki (link, see bottom of the page) a first
draft of the specification for ES3.1. This is in the form of in-
place edits and markups to the ES3 specification. As you will notice
when reading through, there are still some open issues, and details
on a few features to be filled in. This spec shall be updated as we
make progress on these.
I have only skimmed the beginning of the document. The following
change seems like a technical error:
"All constructors are objects, but not all objects are constructors."
-->
"All constructors are functions, but not all functions are usefully
treated as constructors."
ECMAScript constructors need not be functions; an object may implement
the [[Construct]] internal property without also implementing the
[[Call]] internal property, thus it would be a constructor but not a
function. I assume it was not the intent to deliberately remove this
possibility.
Also, the addition of "usefully treated as" does not make sense. An
object that does not implement the [[Construct]] internal property is
not a constructor at all, rather than merely "not usefully treated as"
a constructor.
The definition from the original spec that actually seems wrong is in
4.3.4, "A constructor is a Function object that creates and
initialises objects."
With a lot of the changes, I could not tell if the intent was to
change language semantics or to make a clarifying editorial change.
Regards,
Maciej
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss