[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 170070] [testcase] Javascript 1.5 reserved keyword const is not
From:       Gérard Talbot  <browserbugs () gtalbot ! org>
Date:       2009-06-14 0:57:17
Message-ID: 20090614005717.92D0316F5E () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=170070


Gérard Talbot <browserbugs@gtalbot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Gérard Talbot <browserbugs gtalbot org>  2009-06-14 02:57:12 ---
Section 15.2.3.9 of ECMAScript 3.1 (final draft, candidate specification of
ECMAScript, ECMA-262, 5th edition, April 2009)

http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf

at page 108 states:

{
Section 15.2.3.9
Object.freeze ( O )
When the freeze function is called, the following steps are taken:
1.
2.
If Type(O) is not Object throw a TypeError exception.
For each named own property name P of O,
a. Let desc be the result of calling the [[GetOwnProperty]] internal method of
O with P.
b. If IsDataDescriptor(desc) is true, then
i. If desc.[[Writable]] is true, set desc.[[Writable]] to false.
c. If desc.[[Configurable]] is true, set desc.[[Configurable]] to false.
d. Call the [[DefineOwnProperty]] internal method of O with P, desc, and true
as
arguments.
3. Set the [[Extensible]] internal property of O to false.
4. Return O.
}

therefore replacing const as reserved keyword. 

{
ES3.1 proposes two functions for placing objects into such locked-down states.
Object.seal fixes the definitional state of its argument object.  It does this
by setting the configurable  attribute of each own property to the false state.
 In addition, it marks the object such that additional properties cannot be
added. Object.freeze  performs the same actions as Object.seal.  In addition,
it sets the writable attribute to false for every own data property of the
object.  ES3.1 also provides Object.isSealed and Object.isFrozen  functions for
query whether or not an object is in one of these locked-down states.
Various alternative names such as "fix" and "const" were proposed and
considered as names for the two lock-down states.  The final names were chosen
because it was felt that the selected terms had the greatest cognitive distance
between them and hence would be less subject to confusion.
}
coming from
Proposed ECMAScript 3.1 Static Object Functions: Use Cases and Rationale 
 (Revised August 26, 2008)
http://74.125.45.132/search?q=cache:wqc09mW4jr8J:wiki.ecmascript.org/lib/exe/fetch.php \
?id=es3.1%3Aes3.1_proposal_working_draft&cache=cache&media=es3.1:rationale_for_es3_1_static_object_methodsaug26.doc+ECMAScript+3.1+const&hl=en&ct=clnk&cd=1&gl=us


So, const is not part of the current spec and will not be part of ECMAScript
3.1.

Resolving as INVALID

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic