Defining Getters and Setters

  • Revision slug: Talk:JavaScript/Guide/Obsolete_Pages/Creating_New_Objects/Defining_Getters_and_Setters
  • Revision title: Defining Getters and Setters
  • Revision id: 169079
  • Created:
  • Creator: Spooty
  • Is current revision? No
  • Comment Available only in C?

Revision Content

Getter/Setter Definition Clarification

Since there were no objections even after a few months of waiting, I've moved the clarifications to the article, under the heading "Summary".

Harald Albrecht 22:10, 06 Dec 2005 (MEZ)

Reserved Words?

Does this mean that 'get' and 'set' are now reserved words? It would be nice to know, since .get() and .set() are commonly used method names. AdmiralNovia 10:49, 11 April 2006 (PDT)

It doesn't seem so. --Nickolay 14:10, 11 April 2006 (PDT)

Available only in C?

I'm pretty new to JavaScript, so this is just a note for wiser heads than mine.

The "What's new" page at the start of this document (http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:About) says, "Getters and Setters: JavaScript writers can now add getters and setters to their objects. This feature is available only in the C implementation of JavaScript."

The text here currently says nothing about being available only in C. One location or the other should be clarified.

Revision Source

<h4 name="Getter.2FSetter_Definition_Clarification"> Getter/Setter Definition Clarification </h4>
<p>Since there were no objections even after a few months of waiting, I've moved the clarifications to the article, under the heading "Summary".
</p><p><a href="User:Harald_Albrecht">Harald Albrecht</a> 22:10, 06 Dec 2005 (MEZ)
</p>
<h3 name="Reserved_Words.3F">Reserved Words?</h3>
<p>Does this mean that 'get' and 'set' are now reserved words? It would be nice to know, since .get() and .set() are commonly used method names. <a href="User:AdmiralNovia">AdmiralNovia</a> 10:49, 11 April 2006 (PDT)
</p>
<dl><dd> It doesn't seem so. --<a href="User:Nickolay">Nickolay</a> 14:10, 11 April 2006 (PDT)
</dd></dl>
<h3 name="Available_only_in_C.3F">Available only in C?</h3>
<p>I'm pretty new to JavaScript, so this is just a note for wiser heads than mine.
</p><p>The "What's new" page at the start of this document (http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:About) says,
"Getters and Setters: JavaScript writers can now add getters and setters to their objects. This feature is available only in the C implementation of JavaScript."
</p><p>The text here currently says nothing about being available only in C. One location or the other should be clarified.
</p>
Revert to this revision