Ecma262: [Question]Maybe some inaccurate descriptions in spec

Created on 5 Aug 2017  ·  6Comments  ·  Source: tc39/ecma262

4.2 ECMAScript Overview says:

when the Writable attribute for a property is set to false

Why there "W" is capitals?

4.2.1 Objects

Unlike most class-based object languages

Shoud be "Unlike most class-based object-oriented languages"?

the ECMAScript language includes syntactic class definitions that permit programmers to concisely define objects

Should "objects" be "class"?

~4.3.1 type~

~> set of data values as defined in clause 6 of this specification~

~I think the word "values" is confusing because here the title is "type" and the title of clause 6 is "Data Types and Values",so I think it would be better to replace the word "values" with "standard"/"specification" or "types".~

Both 4.3.22Number object and 4.3.23Infinity and 4.3.24NaN

number value

Should "number" be "Number"?

~The Syntactic Grammar~

~> The syntactic grammar as presented in clauses 12, 13, 14 and 15 is not a complete~

~Should "12, 13, 14 and 15 is" be "12, 13, 14, 15 and is"~

5.2.5 Mathematical Operations

The notation “x modulo y” (y must be finite and nonzero) computes a value k of the same sign as y (or zero) such that abs(k) < abs(y) and x-k = q × y for some integer q.

  1. Should "of the same sign as y" be "of the same sign as x"?(e.g. -7%4 = -3, here x is -7, y is 4, and result -3 is same sign as -7(i.e. x))

  2. Should "NOTE floor(x) = x-(x modulo 1)." be "NOTE ceil(x) = x-(x modulo 1)."?(e.g. -1.5 - (-1.5%1) = -1, it is not floor(-1.5), it is ceil(-1.5))

Table 1: Well-known Symbols

"A Boolean valued property", "A function valued property", "A String valued property", "An object valued property"

Why the form of these are not consistent? i.e "A function valued property" -> "A Function valued property" and "An object valued property" -> "An Object valued property" or "A Boolean valued property" -> "A boolean valued property", "A String valued property" -> "A string valued property"

Most helpful comment

I don't see any of these as significant problems. For modulo, note that Applying the % operator does not reference the spec-internal modulo operation. Feel free to make a PR if you want to discuss casing in more detail, but I actually think each of these casing decisions are well-thought-out already and make sense.

All 6 comments

4.2 ECMAScript Overview says:

when the Writable attribute for a property is set to false

Why there "W" is capitals?

Because this is referring to a specific attribute, whose name is spelled with a capital 'W'. But it should probably be written here as [[Writable]].

4.3.1 type

set of data values as defined in clause 6 of this specification

I think the word "values" is confusing because here the title is "type" and the title of clause 6 is "Data Types and Values",so I think it would be better to replace the word "values" with "standard"/"specification" or "types".

Clause 4.3 is "Terms and Definitions", so this clause is saying that a 'type' is a set of data values as defined in clause 6. Changing "values" to any of your other suggestions would result in an incorrect definition.

The Syntactic Grammar

The syntactic grammar as presented in clauses 12, 13, 14 and 15 is not a complete

Should "12, 13, 14 and 15 is" be "12, 13, 14, 15 and is"

You're presumably missing something between "and" and "is".

cc @domenic @allenwb @littledan Do you have any thought about this? :smile:

I don't see any of these as significant problems. For modulo, note that Applying the % operator does not reference the spec-internal modulo operation. Feel free to make a PR if you want to discuss casing in more detail, but I actually think each of these casing decisions are well-thought-out already and make sense.

thanks!

Was this page helpful?
0 / 5 - 0 ratings