On class literals possibly not making it into ECMAScript.next

Axel Rauschmayer axel at rauschma.de
Fri Nov 4 16:47:11 PDT 2011

When I see singleton objects in JavaScript, I mostly consider them poor man’s modules (including the Object.* methods).

You could write a jQuery module that exports the “everything else” functions and the identifiers $ and jQuery for the DOM stuff.

On Nov 5, 2011, at 0:28 , Rick Waldron wrote:

> No, not at all. It's a conscious design decision that results in only introducing one new property to the global object (two if you count the shorthand reference to $)

>> This pattern makes is _very_ easy for newer developers/adopters to understand the division of functionality:
>> - DOM methods here: jQuery().foo()
>> - Everything else here: jQuery.bar()

Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111105/6d0ba7f4/attachment-0001.html>

More information about the es-discuss mailing list