Here are my preliminary comments.  I haven't reviewed the entire draft yet.

   Waldemar


Overall:  With "const" missing, the changes to chapter 8 for attribute description become premature 
standardization and should be cut.  The problem is that these changes are likely to be incompatible with ES-Harmony for 
the same reasons that cut "const".  Without "const" we have no way of testing this, and I would not 
support issuing a standard only to have to say "oops" a few months later.

5.2:  "step my specify"

7.1:  "format control characters may be used in identifiers, ...":  No they 
can't, according to section 7.6.

7.3:  "except that line terminators that are preceded by an escape sequence may occur":  
"preceded" is not thw right meaning here.  "part of"?

7.3:  The production
 LineTerminator :: ... | <CR> | <CR><LF>
is ambiguous.  Probably the simplest fix is to change it to:
 LineTerminator :: ... | <CR> [lookahead isn't <LF>] | <CR><LF>

Even then having <CR><LF> there causes trouble for things like its use in 
15.10.2.6, 15.10.2.8, and 15.10.2.12.  It's not clear what we want there.

7.5:  Token :: ReservedWord | Identifier | IdentifierName doesn't make sense

7.8.3:  The MV of NumericLiteral :: DecimalLiteral m is not defined.

7.8.3:  This states that decimal literals may be rounded to 20 significant 
digits.  Is that what we want?

7.8.4:  "All Unicode characters may appear literally in a string literal except for 
the closing quote character, backslash, carriage return, and line feed. Any character may 
appear in the form of an escape sequence.":  This is wrong about the other line 
terminators.

8:  Can Property Descriptors and Property Identifiers be stored as user-visible 
properties of objects?  The last sentence seems to imply that they can.

8.5:  "The Decimal type has exactly 10^34*12288+3 values".  I don't think this 
is correct.  How did you arrive at this figure?

There are not ten times as many denormalized Decimal values as there are 
normalized Decimal values.  All of the Decimal number counts in this section 
appear suspect.

Why do we need to distinguish Decimal denorms anyway?  The concept is not used 
anywhere in the document.

Fix grammar and spelling errors.

8.6 to the end of chapter 8:  Cut all the changes or bring back "const".  I 
have plenty of specific bug comments on these, but the whole exercise is now moot.

8.10:  The nomenclature is too inconsistent for me to be able to readily make sense out of this at this time.  
Sometimes you refer to property descriptor properties as "writable" (as in "{value: 42, writable: false, 
configurable: true}", and sometimes as "[[Writable]]" (as in "Desc.[[Writable]]" in 8.10.2).  
Therefore these are two different things just as x.prototype and x.[[Prototype]] are different?

Also, Desc.[[Writable]] doesn't make sense because there is no such internal 
property listed in the table of all internal properties used in this 
specification in 8.6.2.

A big problem that must be addressed and which I've mentioned several times 
before is that the data types from 8.10 are used in earlier sections of chapter 
8 before they are defined here.  I can't figure out which order to read this 
chapter in, as text from 8.10 subtly modifies the interpretation of 8.6.2.  
Solving this problem by moving this content to or near 8.6.2 would help solve 
the others as well.

Can a Property Descriptor include both [[setter]] and [[value]] fields?  8.10 
is ambiguous on that.

9:  Decimal support broken in most of the tables.

9.3:  ToDecimal on a Number gives the Number unchanged?

ToNumber on a Decimal is not defined.

9.8:  ToString on a Decimal is not defined in the table.

The algorithm only works on Number values.  +0, -0, etc. are Number values, not 
Decimal values.  Also, it internally references conversions to Numbers.

9.3.1:  ToDecimal on a string results in a Number.  Also, it optionally drops 
significant digits after the 20th.

10.2:  "functrions"

10.2.1:  "binding can not be set throw a TypeError exception":  Missing comma.

10.2.1.1:  "a ECMAScrpt":  a -> an and fix spelling error

"A declarative environment record binding the set of identifiers defined by the 
declarations contained within its scope.":  Not a sentence.

10.2.1.1.x:  Be consistent about spaces before the opening parenthesis of 
formal parameters.

10.2.1.1.6:  "The S argument is ignored because stict mode deoes not change the meaning of 
setting bindings in declarative environment records have .":  Ah, that's what "S" is 
for?  You didn't explain this earlier when S was first mentioned in the other methods.  Also, fix 
grammar errors.

10.2.1.2.x:  Same comments as above.  Also lots of typos in various places.

10.2.1.2.1:  This will mean that having bindings in the prototype will prevent 
one from building ones in the leaf object.

10.2.1.2.4:  "of it's associated ":  it's -> its

"4. If Result(3) is false or the binding for N in Result(1) is an uninitialized 
immutable binding, then":  What's an uninitialized immutable binding here?  
Result(3) is an object, not an environment.  Objects have properties, not bindings.

10.2.1.2.5:  This will always error out in DefineOwnProperty.

10.2.1.2.6:  "3. If the binding for N in Result(1) is a mutable binding, then": 
 What is a mutable binding?  Result(1) is an object, not an environment.

"4. Else this must be an attempt to change the value of an immutable binding so 
throw a TypeError exception.":  This doesn't follow.  For example, just because 
Result(1) has no binding doesn't mean that its prototype doesn't.

10.2.2.1:  "called with a lexical environment lex, identifier string, name, and 
boolan flag strict the following steps are performed":  Due to several grammar 
errors (an extra comma and a missing one) this doesn't mean what it's supposed to.

10.2.2.x:  "is call" -> "is called".  Lots of other typos as well.

10.2.2.4:  There is no current lexical environment bound around the declaration 
of PopEnvironnmentRecord.

10.3:  "to tract the execution"

What is VariableEnvironment for?  It's never used in the spec, except for a 
mention in 12.2 which is a bug and shouldn't be there.

10.3.2:  Can't do the arguments object this way.  It's incompatible with ES3 
and current practice for multiple arguments sharing the same name.  You also 
don't want users extracting the getters and setters out of the arguments array, 
etc.  Also, the notion of scope in which the getters and setters are eval'd is 
fuzzy at best and can cause problems if other definitions ever shadow the 
parameter names.

10.3.3:  "Variables and functions declared in ECMAScript code evaluate in the 
execution context are added as bindings in the that environment record."  Huh?

"1. Let env be the running execution context's VariableEnvironment."  How do 
those get created?  Section 10.4 should come first.

10.4:  This is still confusing.  What creates execution contexts?  There is no 
such step in the algorithms here.

12.2:  This breaks ES3 and existing practice.  Consider with(o) {var x = 3} if 
o.x exists and has the value 7.  This code currently sets o.x to 3; the 
proposed change would leave it at 7.

13:  "code code"

14:  The syntax of the use strict directive is incompatible with the lexer grammar.  
There is no such separate token.  What happens if someone escapes a character within the 
use strict directive token?  The spaces before "use" and at the end are 
mandatory?  Is it mandatory that the semicolon follow without an intervening space?  How 
does the semicolon interact with semicolon insertion?

Strict directives are ambiguous with statements.

There should be no "opt" after UseStrictDirective's definition.
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to