<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-19315</id>
	<title>Nabble - Mozilla - ECMAScript 4 discussion</title>
	<updated>2009-11-20T20:41:08Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Mozilla---ECMAScript-4-discussion-f19315.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mozilla---ECMAScript-4-discussion-f19315.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26453758</id>
	<title>Re: ES5 left-to-right evaluation order issues</title>
	<published>2009-11-20T20:41:08Z</published>
	<updated>2009-11-20T20:41:08Z</updated>
	<author>
		<name>David-Sarah Hopwood-2</name>
	</author>
	<content type="html">Allen Wirfs-Brock wrote:
&lt;br&gt;&amp;gt; This is good...Perhaps we should have a &amp;quot;design rules&amp;quot; section of the Wiki
&lt;br&gt;to capture stuff like this?
&lt;br&gt;&lt;br&gt;I don't have edit rights to the wiki (the former ES4 wiki, that is, not
&lt;br&gt;the Trac wiki), and AFAIK neither does anyone else who is not a member
&lt;br&gt;of TC39.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453758&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453758&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss-bounces@...&lt;/a&gt;] On Behalf Of David-Sarah Hopwood
&lt;br&gt;&amp;gt; Sent: Friday, November 20, 2009 7:18 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453758&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: ES5 left-to-right evaluation order issues
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Allen Wirfs-Brock wrote:
&lt;br&gt;&amp;gt;&amp;gt; So, the main point is that a belief that ECMAScript has or is supposed 
&lt;br&gt;&amp;gt;&amp;gt; to have a strict left-to-right evaluation order (as the concept is 
&lt;br&gt;&amp;gt;&amp;gt; likely to be understood by typical users of the language) is wrong.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm going to have to insist that the understanding attributed to &amp;quot;typical users&amp;quot; here is an improper understanding of evaluation and coercion in general, and that ECMAScript *does* have left-to-right evaluation order.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In most languages, the issue we're discussing here doesn't arise because if there are implicit coercions, these coercions don't have side effects, and therefore they don't have an observable ordering.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, in an imperative call-by-value language with left-to-right evaluation where *individual operators* perform coercions with observable side effects, the ECMAScript behaviour is precisely what should be expected.
&lt;br&gt;&amp;gt; That's because the coercions are not part of the definition of evaluation; they are specific to the computations performed by each operator.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For example, the ECMAScript * operator behaves as though it were defined something like the following function:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; function &amp;quot;*&amp;quot;(a, b) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; return primitive_multiply(ToNumber(a), ToNumber(b));
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Exactly as for a function application, the argument subexpressions are evaluated, and then some computation is applied to the argument values.
&lt;br&gt;&amp;gt; The coercions are performed, in order, as part of that computation.
&lt;br&gt;&amp;gt; In fact, the coercions are different for each operator, so it is almost essential that they be defined as part of the computation.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If the change to coercion order that Allen originally suggested were made, then it would be necessary to understand the evaluation of operator argument subexpressions as being influenced by the operator and by the argument position (for example, the shift operators coerce their left subexpression with ToInt32 and their right subexpression with ToUint32), as opposed to being uniform for all subexpressions. This is in some ways even weirder that what ECMAScript currently does.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It would also mean that if any future version of ECMAScript included operator overloading, then either it would not be possible to precisely emulate the semantics of the built-in versions of operators, or else the coercions would have to be &amp;quot;baked in&amp;quot; and not overloadable (i.e. the overloading function would have to receive its arguments pre-coerced, rather than being responsible for coercing them). Either of these options are undesirable -- the former would be inconsistent, and the latter less flexible and less efficient, since it wouldn't be possible to drop the coercions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; For consistency,
&lt;br&gt;&amp;gt;&amp;gt; Dave-Sarah's observation that we first &amp;quot;evaluate&amp;quot; and then &amp;quot;coerce&amp;quot; 
&lt;br&gt;&amp;gt;&amp;gt; the operands is probably the guideline we should continue to follow if 
&lt;br&gt;&amp;gt;&amp;gt; we ever define any additional operators where the distinction is relevant.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yes, also for the reasons above.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; David-Sarah Hopwood &amp;nbsp;⚥ &amp;nbsp;&lt;a href=&quot;http://davidsarah.livejournal.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davidsarah.livejournal.com&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;-- 
&lt;br&gt;David-Sarah Hopwood &amp;nbsp;⚥ &amp;nbsp;&lt;a href=&quot;http://davidsarah.livejournal.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davidsarah.livejournal.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26453758&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (300 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26453758/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ES5-left-to-right-evaluation-order-issues-tp26449490p26453758.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26452977</id>
	<title>RE: ES5 left-to-right evaluation order issues</title>
	<published>2009-11-20T17:47:16Z</published>
	<updated>2009-11-20T17:47:16Z</updated>
	<author>
		<name>Allen Wirfs-Brock-2</name>
	</author>
	<content type="html">Since I talked about valueOf in my original message I'm going to interpret Oliver's comment as saying that even in ES3, without getter/setter extensions, you can still observed the separation of &amp;quot;evaluation&amp;quot; from &amp;quot;coercion&amp;quot;. &amp;nbsp;That's correct. In general, the way the ES3 (and 5) spec is written for binary operators of the form expr1 op expr2 any coercion of the value of expr1 types place after the evaluation of expr2. &amp;nbsp;Since expr2 can potentially be an arbitrary expression that includes function calls, side-effects can be generated whi8le evaluating expr2 that are observed to occur before any side-effects from coercion (side-effects of valueOf, etc.) of expr1.
&lt;br&gt;&lt;br&gt;&amp;quot;Fixing&amp;quot; this would require substantial changes to the specification and to existing implementations that I doubt anyone wants to make.
&lt;br&gt;&lt;br&gt;So, the main point is that a belief that ECMAScript has or is supposed to have a strict left-to-right evaluation order (as the concept is likely to be understood by typical users of the language) is wrong. For consistency, Dave-Sarah's observation that we first &amp;quot;evaluate&amp;quot; and then &amp;quot;coerce&amp;quot; the operands is probably the guideline we should continue to follow if we ever define any additional operators where the distinction is relevant.
&lt;br&gt;&lt;br&gt;allen
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26452977&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26452977&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss-bounces@...&lt;/a&gt;] On Behalf Of Oliver Hunt
&lt;br&gt;Sent: Friday, November 20, 2009 5:07 PM
&lt;br&gt;To: David-Sarah Hopwood
&lt;br&gt;Cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26452977&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss@...&lt;/a&gt;
&lt;br&gt;Subject: Re: ES5 left-to-right evaluation order issues
&lt;br&gt;&lt;br&gt;It was also observable through valueOf, toString, etc
&lt;br&gt;&lt;br&gt;--Oliver
&lt;br&gt;&lt;br&gt;On Nov 20, 2009, at 4:40 PM, David-Sarah Hopwood wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Allen Wirfs-Brock wrote:
&lt;br&gt;&amp;gt;&amp;gt; var o={get a() {alert(&amp;quot;get a&amp;quot;);return a}, get b() {alert (&amp;quot;get b&amp;quot;);return b}};
&lt;br&gt;&amp;gt;&amp;gt; o.a*o.b;
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; GetValue calls the accessor get functions, so based upon the above algorithm,
&lt;br&gt;&amp;gt;&amp;gt; you would expect to see the alert sequence: &amp;quot;get a&amp;quot;, &amp;quot;get b&amp;quot;, &amp;quot;a valueOf&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;b valueOf&amp;quot;. &amp;nbsp;This is exactly what happens for existing getter/setter
&lt;br&gt;&amp;gt;&amp;gt; implementations in at least FF and Chrome.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't see a significant problem here. The arguments are still *evaluated*
&lt;br&gt;&amp;gt; in left-to-right order. They're just not *coerced* at the same time as they
&lt;br&gt;&amp;gt; are evaluated. But that was always the case in ES3; it hasn't changed in
&lt;br&gt;&amp;gt; ES5. It's just a little bit more easily observable in ES5 because of
&lt;br&gt;&amp;gt; getters.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; David-Sarah Hopwood &amp;nbsp;⚥ &amp;nbsp;&lt;a href=&quot;http://davidsarah.livejournal.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davidsarah.livejournal.com&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; es5-discuss mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26452977&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://mail.mozilla.org/listinfo/es5-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es5-discuss&lt;/a&gt;&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es5-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26452977&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es5-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es5-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es5-discuss&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26452977&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ES5-left-to-right-evaluation-order-issues-tp26449490p26452977.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26450289</id>
	<title>RE: Clauses or Sections?</title>
	<published>2009-11-20T13:06:52Z</published>
	<updated>2009-11-20T13:06:52Z</updated>
	<author>
		<name>Allen Wirfs-Brock-2</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;#8220;clause&amp;#8221; is ISO (and hence ECMA) required terminology
for what most of us would prefer to call a &amp;#8220;section&amp;#8221; or &amp;#8220;chapter&amp;#8221;.
&amp;nbsp;There is also the term &amp;#8220;subclause&amp;#8221; but it usually can be
avoided.&amp;nbsp; Hopefully, all the referencing terminology is consistent with
the ISO rules (if not, no doubt we will hear about it during the fast track
process).&amp;nbsp; Generally you have to explicitly say &amp;#8220;clause&amp;#8221; in
front of a &amp;#8220;whole number reference (eg, &amp;#8220;clause 7&amp;#8221; or &amp;#8220;see
clause 7&amp;#8221;) but you can leave out &amp;#8220;subclass from such references, eg
&amp;#8220;(7.2)&amp;#8221; or &amp;#8220;see 7.2&amp;#8221;.&amp;nbsp;&amp;nbsp; If anybody would like
to read the whole &amp;nbsp;68 pages of such rules the document you want to see is
ISO/IEC-016 &amp;#8220;Rules for the structure and drafting of International
Standards&amp;#8221;&amp;nbsp; :-)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Allen&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26450289&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26450289&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Thomas L. Shinnick&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 16, 2009 12:47 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Brendan Eich&lt;br&gt;
&lt;b&gt;Cc:&lt;/b&gt; es-discuss&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: Clauses or Sections?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;At 01:35 PM 11/16/2009, Brendan Eich wrote:&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;On Nov 16, 2009, at 11:25 AM, Garrett Smith wrote:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;The ES5 Specification mentions &amp;quot;clauses&amp;quot; in many
places (e.g. &amp;quot;Clause&lt;br&gt;
10.&amp;quot;). This seems unclear. Is a &amp;quot;clause&amp;quot; the same thing as a&lt;br&gt;
&amp;quot;section&amp;quot;? Why the double terminology?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
I don't know -- I should have noticed these, since ES3 lacks such&amp;nbsp; &lt;br&gt;
solecisms. &amp;quot;Clause&amp;quot; occurs in ES3 only as part of CatchClause(s).&lt;br&gt;
&lt;br&gt;
It's odd to use clause, which has a specific meaning in natural&amp;nbsp; &lt;br&gt;
language grammars, and a different but irrelevant meaning for legal&amp;nbsp; &lt;br&gt;
documents, to mean something as big as an ES5 section.&lt;br&gt;
&lt;br&gt;
Allen no doubt knows the history. I hope this isn't an Ecma thing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
I'm sure it is, and the style is consistent with 'clause' === 'chapter-level',
e.g.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;The syntactic grammar for ECMAScript is given in
clauses 11, 12, 13 and 14.&amp;quot;&lt;br&gt;
&lt;br&gt;
This bit of strangeness was mentioned by me back in January, saying &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Sometimes there will be a bare &amp;quot;clause 7&amp;quot; or
&amp;quot;See clause 14&amp;quot;, but elsewhere it will be stated &amp;quot;See 7.2&amp;quot;
or &amp;quot;See clause 14.1&amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Is it just custom not to say 'chapter' or 'section'?&amp;nbsp;
Or is it a carry-over from some style guide?&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;examples&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; In fact, it seems the uses of 'section' outnumber those of
'clause'...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; It does conflict a bit with needed terminology &amp;quot;case
clause&amp;quot;&lt;br&gt;
and by others since.&lt;br&gt;
&lt;br&gt;
Gotta be a style thing, as in 'irritating' but thus not actionable?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p&gt;-- &lt;br&gt;
I'm a pessimist about probabilities; I'm an optimist about possibilities.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Lewis Mumford&amp;nbsp; (1895-1990) &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26450289&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Clauses-or-Sections--tp26377882p26450289.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26449490</id>
	<title>ES5 left-to-right evaluation order issues</title>
	<published>2009-11-20T12:05:29Z</published>
	<updated>2009-11-20T12:05:29Z</updated>
	<author>
		<name>Allen Wirfs-Brock-2</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;We generally claim that ECMAScript uses a left-to-right
evaluation order and in ES5 we even fixed what was consider a bug in the ES3
spec (second item ES5 Annex D) regarding evaluation order of relational
operators.&amp;nbsp; Consider:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;var a={valueOf: function () {alert(&amp;quot; a
valueOf&amp;quot;);return 1}};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;var b={valueOf: function () {alert(&amp;quot; b
valueOf&amp;quot;);return 2}};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;a&amp;lt;=b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;A strict implementation of the ES3 spec. would alert: &amp;#8220;b
valueOf&amp;#8221; followed by &amp;#8220;a valueOf&amp;#8221; indicating what appears
to&amp;nbsp; be a right-to-left evaluation order.&amp;nbsp; Chrome actually does this
while at least IE and FF alert &amp;#8220;a valueOf&amp;#8221; followed by &amp;#8220;b
valueOf&amp;#8221;.&amp;nbsp; The ES5 changes say that &amp;#8220;a valueOf&amp;#8221; should
occur first as this is consistent with the general left-to-right rule.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;However, when accessor properties were added to the
specification we did not consider the observable ordering interaction between accessor
get functions with side-effects and ToPrimitive operations (ie valueOf) with
side-effects.&amp;nbsp; A typical binary operator algorithm from section 11 looks
like:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let
left be the result of evaluating MultiplicativeExpression.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let
leftValue be GetValue(left).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let
right be the result of evaluating UnaryExpression.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let
rightValue be GetValue(right).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let
leftNum be ToNumber(leftValue).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let
rightNum be ToNumber(rightValue).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return
the result of applying the specified operation (*, /, or %) to leftNum and
rightNum. See the Notes below 11.5.1, 11.5.2, 11.5.3.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Note that the two calls to GetValue precede the two calls to
ToNumber.&amp;nbsp; Generally in ES3 GetValue doesn&amp;#8217;t have side-effects so
left-to-right order is maintained (however the ordering is observable if the
right argument throws a ReferenceError).&amp;nbsp; The interweaved evaluation order
is much easier to observe if accessor properties are implemented.&amp;nbsp;
Consider executing the following in the context of the declarations of a and b
above:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;var o={get a() {alert(&amp;quot;get a&amp;quot;);return a}, get b()
{alert (&amp;quot;get b&amp;quot;);return b}};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;o.a*o.b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;GetValue calls the accessor get functions, so based upon the
above algorithm, you would expect to see the alert sequence: &amp;#8220;get a&amp;#8221;,
&amp;#8220;get b&amp;#8221;, &amp;#8220;a valueOf&amp;#8221;, &amp;#8220;b valueOf&amp;#8221;.&amp;nbsp; This
is exactly what happens for existing getter/setter implementations in at least
FF and Chrome.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;So, the ES5 specification of operators is consistent with
existing implementations of accessor properties.&amp;nbsp; However, this is not a
strict left-to-right order of evaluation order.&amp;nbsp; We don&amp;#8217;t have many
options at this point.&amp;nbsp; Here are the alternatives I see:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;1.&amp;nbsp; Abandon the idea that ECMAScript&amp;nbsp; does strict
left-to-right evaluation (it never really did, anyway) and be content with the
story that it generally evaluates left to right with assorted special case
exceptions to this rule.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;2. &amp;nbsp;Consider all existing violation of strict
left-to-right evaluation as specification bugs and make a big note of that in
the errata.&amp;nbsp; Maybe they can be fixed in the ISO version of the ES5 spec.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;It would take substantial work to fix this throughout the
specification and actual implementation of the strict left-to-right rule would introduce
numerous potentially observable changes to existing implementations.&amp;nbsp;
Based upon this, I suspect that we have to choose alternative #1 although I
would personally be open to considering alternative #2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Thoughts?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26449490&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ES5-left-to-right-evaluation-order-issues-tp26449490p26449490.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26419784</id>
	<title>Re: Conflicts between W3C specs and ES5?</title>
	<published>2009-11-18T19:20:12Z</published>
	<updated>2009-11-18T19:20:12Z</updated>
	<author>
		<name>Garrett</name>
	</author>
	<content type="html">On Wed, Nov 18, 2009 at 4:16 PM, Brendan Eich &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419784&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brendan@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Nov 18, 2009, at 3:25 PM, David-Sarah Hopwood wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Brendan Eich wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Nov 17, 2009, at 6:41 PM, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; otherWindow.copyOfEvalFromYetAnotherWindow(&amp;quot;...&amp;quot;) throws
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; What is the rationale for throwing in this last case, rather than
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; using the explicit base object (otherWindow) as |this|?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The standard ECMA-262 semantics want otherWindow -- &amp;quot;bound method&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; exceptions prove the rule.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There are bound methods in ES implementations? I'm all ears.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;IE's famous appendChild &amp;quot;performance trick&amp;quot;:
&lt;br&gt;&lt;br&gt;var bodyAppendChild = document.body.appendChild;
&lt;br&gt;bodyAppendChild(document.createTextNode(&amp;quot;hello&amp;quot;));
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;The results in an error in other browsers; not IE (to be expected).
&lt;br&gt;&lt;br&gt;DOes that fit the definition of &amp;quot;bound method&amp;quot;?
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419784&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Conflicts-between-W3C-specs-and-ES5--tp26417697p26419784.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26418444</id>
	<title>Re: Conflicts between W3C specs and ES5?</title>
	<published>2009-11-18T16:39:29Z</published>
	<updated>2009-11-18T16:39:29Z</updated>
	<author>
		<name>Maciej Stachowiak</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 18, 2009, at 3:25 PM, David-Sarah Hopwood wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Brendan Eich wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Nov 17, 2009, at 6:41 PM, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; otherWindow.copyOfEvalFromYetAnotherWindow(&amp;quot;...&amp;quot;) throws
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; What is the rationale for throwing in this last case, rather than
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; using the explicit base object (otherWindow) as |this|?
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;&amp;gt; The standard ECMA-262 semantics want otherWindow -- &amp;quot;bound method&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; exceptions prove the rule.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There are bound methods in ES implementations? I'm all ears.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (One thing I've never understood is why ES implementors add features
&lt;br&gt;&amp;gt; or exceptional behaviour that users of the language could only find,
&lt;br&gt;&amp;gt; or even know to look for, by reverse engineering or guesswork. What's
&lt;br&gt;&amp;gt; the point? Doesn't it take more work to add all this stuff?)
&lt;/div&gt;&lt;br&gt;In the case of the original topic (eval), in JavaScriptCore it is only &amp;nbsp;
&lt;br&gt;&amp;quot;bound&amp;quot; enough to reject being called with the wrong &amp;quot;this&amp;quot; object; it &amp;nbsp;
&lt;br&gt;does not do anything else with its stored original global object. We &amp;nbsp;
&lt;br&gt;did this solely to match the ES4 &amp;quot;reformed eval&amp;quot; proposal at the time, &amp;nbsp;
&lt;br&gt;as I mentioned on the public-script-coord list.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Maciej
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418444&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Conflicts-between-W3C-specs-and-ES5--tp26417697p26418444.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26418259</id>
	<title>Re: Conflicts between W3C specs and ES5?</title>
	<published>2009-11-18T16:16:28Z</published>
	<updated>2009-11-18T16:16:28Z</updated>
	<author>
		<name>Brendan Eich-3</name>
	</author>
	<content type="html">On Nov 18, 2009, at 3:25 PM, David-Sarah Hopwood wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Brendan Eich wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Nov 17, 2009, at 6:41 PM, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; otherWindow.copyOfEvalFromYetAnotherWindow(&amp;quot;...&amp;quot;) throws
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; What is the rationale for throwing in this last case, rather than
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; using the explicit base object (otherWindow) as |this|?
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;&amp;gt; The standard ECMA-262 semantics want otherWindow -- &amp;quot;bound method&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; exceptions prove the rule.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There are bound methods in ES implementations? I'm all ears.
&lt;/div&gt;&lt;br&gt;There certainly are. First, I was not referring to any built-in magic. &amp;nbsp;
&lt;br&gt;Function.prototype.bind and similar such APIs were developed first by &amp;nbsp;
&lt;br&gt;Ajax libraries and used to force |this| to a preset value, instead of &amp;nbsp;
&lt;br&gt;using a base object in the callee reference pair (base object, &amp;nbsp;
&lt;br&gt;property name).
&lt;br&gt;&lt;br&gt;But, of course, host objects in various implementations sport bound &amp;nbsp;
&lt;br&gt;methods. The original ones I know of came from the Java/JS bridge, &amp;nbsp;
&lt;br&gt;&amp;quot;LiveConnect&amp;quot;, because Java method reflections in JS seemed not &amp;nbsp;
&lt;br&gt;usefully extractable as first-class functions. Instead, extraction &amp;nbsp;
&lt;br&gt;binds method to receiver, so application coerces |this|.
&lt;br&gt;&lt;br&gt;(E4X (ECMA-357) has methods that can't be extracted at all, they are &amp;nbsp;
&lt;br&gt;invoke-only; this is even worse than auto-bound methods!)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; (One thing I've never understood is why ES implementors add features
&lt;br&gt;&amp;gt; or exceptional behaviour that users of the language could only find,
&lt;br&gt;&amp;gt; or even know to look for, by reverse engineering or guesswork. What's
&lt;br&gt;&amp;gt; the point? Doesn't it take more work to add all this stuff?)
&lt;br&gt;&lt;br&gt;No, it takes less work to hack &amp;quot;privileged&amp;quot; C++ than to figure out how &amp;nbsp;
&lt;br&gt;to host the magic in-language. The proof is in the proliferation of &amp;nbsp;
&lt;br&gt;bad host object magic.
&lt;br&gt;&lt;br&gt;If JS had time to be bootstrapped a la Smalltalk, with small native- 
&lt;br&gt;method &amp;quot;area&amp;quot; and API surface, then it would be a better world. But &amp;nbsp;
&lt;br&gt;like Java, JS was and is native-code-heavy in its popular &amp;nbsp;
&lt;br&gt;implementations, and this means host magic.
&lt;br&gt;&lt;br&gt;/be
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418259&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Conflicts-between-W3C-specs-and-ES5--tp26417697p26418259.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26417697</id>
	<title>Re: Conflicts between W3C specs and ES5?</title>
	<published>2009-11-18T15:25:20Z</published>
	<updated>2009-11-18T15:25:20Z</updated>
	<author>
		<name>David-Sarah Hopwood-2</name>
	</author>
	<content type="html">Brendan Eich wrote:
&lt;br&gt;&amp;gt; On Nov 17, 2009, at 6:41 PM, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; otherWindow.copyOfEvalFromYetAnotherWindow(&amp;quot;...&amp;quot;) throws
&lt;br&gt;[...]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; What is the rationale for throwing in this last case, rather than
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; using the explicit base object (otherWindow) as |this|?
&lt;br&gt;[...]
&lt;br&gt;&amp;gt; The standard ECMA-262 semantics want otherWindow -- &amp;quot;bound method&amp;quot;
&lt;br&gt;&amp;gt; exceptions prove the rule.
&lt;br&gt;&lt;br&gt;There are bound methods in ES implementations? I'm all ears.
&lt;br&gt;&lt;br&gt;&lt;br&gt;(One thing I've never understood is why ES implementors add features
&lt;br&gt;or exceptional behaviour that users of the language could only find,
&lt;br&gt;or even know to look for, by reverse engineering or guesswork. What's
&lt;br&gt;the point? Doesn't it take more work to add all this stuff?)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;David-Sarah Hopwood &amp;nbsp;⚥ &amp;nbsp;&lt;a href=&quot;http://davidsarah.livejournal.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davidsarah.livejournal.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26417697&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (300 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26417697/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Conflicts-between-W3C-specs-and-ES5--tp26417697p26417697.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26382656</id>
	<title>Re: AST in JSON format</title>
	<published>2009-11-16T16:58:51Z</published>
	<updated>2009-11-16T16:58:51Z</updated>
	<author>
		<name>kevin curtis</name>
	</author>
	<content type="html">The previous example was pretty printed. A production version would
&lt;br&gt;offer a minified &amp;nbsp;alternative without newlines and indentation. e.g:
&lt;br&gt;&lt;br&gt;[&amp;quot;Program&amp;quot;,[&amp;quot;ExprStmt&amp;quot;,[&amp;quot;Assign&amp;quot;,{&amp;quot;op&amp;quot;:&amp;quot;=&amp;quot;},[&amp;quot;Id&amp;quot;,{&amp;quot;name&amp;quot;:&amp;quot;x&amp;quot;}], ...
&lt;br&gt;&lt;br&gt;Perhaps there could be in addition an alternative compact format where
&lt;br&gt;the element strings are replaced with integers:
&lt;br&gt;&lt;br&gt;[44,[20,[21,{&amp;quot;op&amp;quot;:&amp;quot;=&amp;quot;},[25,{&amp;quot;name&amp;quot;:&amp;quot;x&amp;quot;}], ...
&lt;br&gt;&lt;br&gt;And the attribute name string with an integer or maybe the first letter:
&lt;br&gt;&lt;br&gt;[44,[20,[21,{1:&amp;quot;=&amp;quot;},[25,{3:&amp;quot;x&amp;quot;}], ...
&lt;br&gt;[44,[20,[21,{&amp;quot;o&amp;quot;:&amp;quot;=&amp;quot;},[25,{n:&amp;quot;x&amp;quot;}], ...
&lt;br&gt;&lt;br&gt;It's compact and as the integers match the underlying enum no hash
&lt;br&gt;lookup for the element/attribute string names is required. Kind of a
&lt;br&gt;half way house between the AST and bytecode. e.g:
&lt;br&gt;&lt;br&gt;var ast = JSON.AST.parse(source, true); // true for compact mode
&lt;br&gt;var result = JSON.AST.evaluate(ast); // No special mode required
&lt;br&gt;&lt;br&gt;The evaluate() function would simply test if the element value was a
&lt;br&gt;string or integer and hash lookup or atoi.
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26382656&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AST-in-JSON-format-tp25903606p26382656.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26382575</id>
	<title>Re: AST in JSON format</title>
	<published>2009-11-16T16:49:43Z</published>
	<updated>2009-11-16T16:49:43Z</updated>
	<author>
		<name>kevin curtis</name>
	</author>
	<content type="html">I have tweaked the JsonML AST format (shorter element names and
&lt;br&gt;operator tokens not names eg &amp;quot;&amp;gt;=&amp;quot; instead of &amp;quot;GTE&amp;quot;) and added an
&lt;br&gt;evaluate() function which can execute the JsonML string. Example:
&lt;br&gt;&lt;br&gt;&amp;gt; more example.js
&lt;br&gt;var source = &amp;quot;x = 2; if (x &amp;gt; 1) print(x + 3);&amp;quot;;
&lt;br&gt;&lt;br&gt;print(&amp;quot;--- js source ---&amp;quot;);
&lt;br&gt;print(source);
&lt;br&gt;print(&amp;quot;&amp;quot;);
&lt;br&gt;&lt;br&gt;print(&amp;quot;--- ast ---&amp;quot;);
&lt;br&gt;var ast = JSON.AST.parse(source);
&lt;br&gt;print(ast);
&lt;br&gt;print(&amp;quot;&amp;quot;);
&lt;br&gt;&lt;br&gt;print(&amp;quot;--- evaluate(ast) ---&amp;quot;);
&lt;br&gt;JSON.AST.evaluate(ast);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; ./shell_g example.js
&lt;br&gt;--- js source ---
&lt;br&gt;x = 2; if (x &amp;gt; 1) print(x + 3);
&lt;br&gt;&lt;br&gt;--- ast ---
&lt;br&gt;[&amp;quot;Program&amp;quot;,
&lt;br&gt;&amp;nbsp; [&amp;quot;ExprStmt&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;Assign&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;op&amp;quot;:&amp;quot;=&amp;quot;},
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Id&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;name&amp;quot;:&amp;quot;x&amp;quot;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Literal&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;handle&amp;quot;:2}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; ],
&lt;br&gt;&amp;nbsp; [&amp;quot;If&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;CompareOp&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;op&amp;quot;:&amp;quot;&amp;gt;&amp;quot;},
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Id&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;name&amp;quot;:&amp;quot;x&amp;quot;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Literal&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;handle&amp;quot;:1}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; &amp;nbsp; ],
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;ExprStmt&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Call&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Id&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;name&amp;quot;:&amp;quot;print&amp;quot;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;BinOp&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;op&amp;quot;:&amp;quot;+&amp;quot;},
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Id&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;name&amp;quot;:&amp;quot;x&amp;quot;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&amp;quot;Literal&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;quot;handle&amp;quot;:3}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; &amp;nbsp; ],
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;EmptyStmt&amp;quot;]
&lt;br&gt;&amp;nbsp; ]
&lt;br&gt;]
&lt;br&gt;&lt;br&gt;--- evaluate(ast) ---
&lt;br&gt;5
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26382575&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AST-in-JSON-format-tp25903606p26382575.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26379459</id>
	<title>Re: Clauses or Sections?</title>
	<published>2009-11-16T13:05:13Z</published>
	<updated>2009-11-16T13:05:13Z</updated>
	<author>
		<name>OpenStrat</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=&quot;text/html; charset=US-ASCII&quot; http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18852&quot;&gt;&lt;/HEAD&gt;
&lt;BODY style=&quot;FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 10pt&quot; id=role_body bottomMargin=7 leftMargin=7 rightMargin=7 topMargin=7&gt;&lt;FONT id=role_document color=#000000 size=2 face=Arial&gt;
&lt;DIV&gt;It is a style thing related to common ECMA and ISO style guides.&amp;nbsp; 
&quot;Clause 14&quot; is a correct reference to major heading &quot;14&quot;, and references to 
&quot;sub-clauses&quot; such as &quot;14.1&quot; are referenced directly without mention of 
&quot;clause&quot;, &quot;section&quot;, &quot;paragraph&quot; &quot;etc&quot;.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Section, such as &quot;Section 1&quot; is a division of the document higher than 
Clause.&amp;nbsp; For example &quot;Section 1&quot; may have one or more &quot;clauses&quot; such as 
&quot;clause 14&quot; of &quot;Section 2&quot;.&amp;nbsp; The rules are spelled out in the ISO Style 
Guide and the Ecma Style Guide.&amp;nbsp; If in doubt, contact Patrick at &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26379459&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;patrick@...&lt;/a&gt; 
who will be able to give you specific guidance.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;In a message dated 11/16/2009 3:47:37 P.M. Eastern Standard Time, 
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26379459&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tshinnic@...&lt;/a&gt; writes:&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;BORDER-LEFT: blue 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px&quot;&gt;&lt;FONT style=&quot;BACKGROUND-COLOR: transparent&quot; color=#000000 size=2 face=Arial&gt;&lt;FONT size=3&gt;At 01:35 PM 11/16/2009, Brendan Eich wrote:&lt;BR&gt;
  &lt;BLOCKQUOTE class=cite cite=&quot;&quot; type=&quot;cite&quot;&gt;On Nov 16, 2009, at 11:25 AM, 
    Garrett Smith wrote:&lt;BR&gt;&lt;BR&gt;
    &lt;BLOCKQUOTE class=cite cite=&quot;&quot; type=&quot;cite&quot;&gt;The ES5 Specification mentions 
      &quot;clauses&quot; in many places (e.g. &quot;Clause&lt;BR&gt;10.&quot;). This seems unclear. Is a 
      &quot;clause&quot; the same thing as a&lt;BR&gt;&quot;section&quot;? Why the double 
    terminology?&lt;/BLOCKQUOTE&gt;&lt;BR&gt;I don't know -- I should have noticed these, 
    since ES3 lacks such&amp;nbsp; &lt;BR&gt;solecisms. &quot;Clause&quot; occurs in ES3 only as 
    part of CatchClause(s).&lt;BR&gt;&lt;BR&gt;It's odd to use clause, which has a specific 
    meaning in natural&amp;nbsp; &lt;BR&gt;language grammars, and a different but 
    irrelevant meaning for legal&amp;nbsp; &lt;BR&gt;documents, to mean something as big 
    as an ES5 section.&lt;BR&gt;&lt;BR&gt;Allen no doubt knows the history. I hope this 
    isn't an Ecma thing.&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;I'm sure it is, and the style is 
  consistent with 'clause' === 'chapter-level', e.g.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;The 
  syntactic grammar for ECMAScript is given in clauses 11, 12, 13 and 
  14.&quot;&lt;BR&gt;&lt;BR&gt;This bit of strangeness was mentioned by me back in January, 
  saying &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sometimes there will be a bare &quot;clause 7&quot; or 
  &quot;See clause 14&quot;, but elsewhere it will be stated &quot;See 7.2&quot; or &quot;See clause 
  14.1&quot;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is it just custom not to say 'chapter' or 
  'section'?&amp;nbsp; Or is it a carry-over from some style 
  guide?&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  &amp;lt;examples&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  :&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In fact, it seems the uses of 'section' outnumber 
  those of 'clause'...&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It does conflict a bit with needed 
  terminology &quot;case clause&quot;&lt;BR&gt;and by others since.&lt;BR&gt;&lt;BR&gt;Gotta be a style 
  thing, as in 'irritating' but thus not actionable?&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;X-SIGSEP&gt;
  &lt;P&gt;&lt;/X-SIGSEP&gt;-- &lt;BR&gt;I'm a pessimist about probabilities; I'm an optimist 
  about possibilities.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lewis Mumford&amp;nbsp; (1895-1990) 
  &lt;BR&gt;&lt;BR&gt;&lt;BR&gt;_______________________________________________&lt;BR&gt;es-discuss 
  mailing 
  list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26379459&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;&lt;BR&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26379459&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Clauses-or-Sections--tp26377882p26379459.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26379193</id>
	<title>Re: Clauses or Sections?</title>
	<published>2009-11-16T12:47:11Z</published>
	<updated>2009-11-16T12:47:11Z</updated>
	<author>
		<name>Thomas L. Shinnick</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;body&gt;
&lt;font size=3&gt;At 01:35 PM 11/16/2009, Brendan Eich wrote:&lt;br&gt;
&lt;blockquote type=cite class=cite cite=&quot;&quot;&gt;On Nov 16, 2009, at 11:25 AM,
Garrett Smith wrote:&lt;br&gt;&lt;br&gt;
&lt;blockquote type=cite class=cite cite=&quot;&quot;&gt;The ES5 Specification mentions
&amp;quot;clauses&amp;quot; in many places (e.g. &amp;quot;Clause&lt;br&gt;
10.&amp;quot;). This seems unclear. Is a &amp;quot;clause&amp;quot; the same thing as
a&lt;br&gt;
&amp;quot;section&amp;quot;? Why the double terminology?&lt;/blockquote&gt;&lt;br&gt;
I don't know -- I should have noticed these, since ES3 lacks such&amp;nbsp;
&lt;br&gt;
solecisms. &amp;quot;Clause&amp;quot; occurs in ES3 only as part of
CatchClause(s).&lt;br&gt;&lt;br&gt;
It's odd to use clause, which has a specific meaning in natural&amp;nbsp;
&lt;br&gt;
language grammars, and a different but irrelevant meaning for legal&amp;nbsp;
&lt;br&gt;
documents, to mean something as big as an ES5 section.&lt;br&gt;&lt;br&gt;
Allen no doubt knows the history. I hope this isn't an Ecma
thing.&lt;/font&gt;&lt;/blockquote&gt;&lt;br&gt;
I'm sure it is, and the style is consistent with 'clause' ===
'chapter-level', e.g.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;The syntactic grammar for ECMAScript is given in
clauses 11, 12, 13 and 14.&amp;quot;&lt;br&gt;&lt;br&gt;
This bit of strangeness was mentioned by me back in January, saying &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Sometimes there will be a bare &amp;quot;clause 7&amp;quot; or
&amp;quot;See clause 14&amp;quot;, but elsewhere it will be stated &amp;quot;See
7.2&amp;quot; or &amp;quot;See clause 14.1&amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Is it just custom not to say 'chapter' or
'section'?&amp;nbsp; Or is it a carry-over from some style guide?&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;examples&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; In fact, it seems the uses of 'section' outnumber
those of 'clause'...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; It does conflict a bit with needed terminology
&amp;quot;case clause&amp;quot;&lt;br&gt;
and by others since.&lt;br&gt;&lt;br&gt;
Gotta be a style thing, as in 'irritating' but thus not
actionable?&lt;br&gt;&lt;br&gt;
&lt;br&gt;
&lt;x-sigsep&gt;&lt;p&gt;&lt;/x-sigsep&gt;
-- &lt;br&gt;
I'm a pessimist about probabilities; I'm an optimist about
possibilities.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Lewis Mumford&amp;nbsp; (1895-1990) &lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26379193&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Clauses-or-Sections--tp26377882p26379193.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26378045</id>
	<title>Re: Clauses or Sections?</title>
	<published>2009-11-16T11:35:04Z</published>
	<updated>2009-11-16T11:35:04Z</updated>
	<author>
		<name>Brendan Eich-3</name>
	</author>
	<content type="html">On Nov 16, 2009, at 11:25 AM, Garrett Smith wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; The ES5 Specification mentions &amp;quot;clauses&amp;quot; in many places (e.g. &amp;quot;Clause
&lt;br&gt;&amp;gt; 10.&amp;quot;). This seems unclear. Is a &amp;quot;clause&amp;quot; the same thing as a
&lt;br&gt;&amp;gt; &amp;quot;section&amp;quot;? Why the double terminology?
&lt;br&gt;&lt;br&gt;I don't know -- I should have noticed these, since ES3 lacks such &amp;nbsp;
&lt;br&gt;solecisms. &amp;quot;Clause&amp;quot; occurs in ES3 only as part of CatchClause(s).
&lt;br&gt;&lt;br&gt;It's odd to use clause, which has a specific meaning in natural &amp;nbsp;
&lt;br&gt;language grammars, and a different but irrelevant meaning for legal &amp;nbsp;
&lt;br&gt;documents, to mean something as big as an ES5 section.
&lt;br&gt;&lt;br&gt;Allen no doubt knows the history. I hope this isn't an Ecma thing.
&lt;br&gt;&lt;br&gt;Non-random link:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/There_Ain%27t_No_Sanity_Clause&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/There_Ain%27t_No_Sanity_Clause&lt;/a&gt;&lt;br&gt;&lt;br&gt;/be
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26378045&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Clauses-or-Sections--tp26377882p26378045.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26377882</id>
	<title>Clauses or Sections?</title>
	<published>2009-11-16T11:25:25Z</published>
	<updated>2009-11-16T11:25:25Z</updated>
	<author>
		<name>Garrett</name>
	</author>
	<content type="html">The ES5 Specification mentions &amp;quot;clauses&amp;quot; in many places (e.g. &amp;quot;Clause
&lt;br&gt;10.&amp;quot;). This seems unclear. Is a &amp;quot;clause&amp;quot; the same thing as a
&lt;br&gt;&amp;quot;section&amp;quot;? Why the double terminology?
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26377882&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Clauses-or-Sections--tp26377882p26377882.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26354179</id>
	<title>Typo in Annex E</title>
	<published>2009-11-14T13:50:44Z</published>
	<updated>2009-11-14T13:50:44Z</updated>
	<author>
		<name>Kris Kowal-2</name>
	</author>
	<content type="html">The last paragraph of Annex E notes that &amp;quot;getPropertyName&amp;quot; is among
&lt;br&gt;the divergences from ES3. &amp;nbsp;I presume this is intended to be
&lt;br&gt;&amp;quot;getPropertyNames&amp;quot; with plural infection.
&lt;br&gt;&lt;br&gt;Kris Kowal
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26354179&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Typo-in-Annex-E-tp26354179p26354179.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26354066</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-14T13:34:34Z</published>
	<updated>2009-11-14T13:34:34Z</updated>
	<author>
		<name>Kris Kowal-2</name>
	</author>
	<content type="html">[+ commonjs]
&lt;br&gt;&lt;br&gt;On Sat, Nov 7, 2009 at 6:21 PM, Maciej Stachowiak &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26354066&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mjs@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; If nothing else there's quite a bit of prior art collected which should
&lt;br&gt;&amp;gt; inform the conversation. I know the Binary/B proposal has the implementation
&lt;br&gt;&amp;gt; momentum, but I don't know exactly what the status is. I haven't been
&lt;br&gt;&amp;gt; closely following the evolution of these binary specs too closely but since
&lt;br&gt;&amp;gt; it seems that nearly everyone else from the group is off to jsconf.eu I
&lt;br&gt;&amp;gt; figured I ought to toss this out there.
&lt;br&gt;&lt;br&gt;Thanks, we're back, and convergence on binary data API's are our next
&lt;br&gt;big thrust. &amp;nbsp;I spoke with Brian Mitchell at jsconf.eu who has a
&lt;br&gt;significant interest in our binary proposals. &amp;nbsp;Particularly there was
&lt;br&gt;a lot of interest in bit quantized data types, which in my opinion
&lt;br&gt;would complement but not replace byte quantized data types. &amp;nbsp;At this
&lt;br&gt;point, I imagine that we will eventually have ByteString, ByteArray,
&lt;br&gt;ByteStream, BitString, BitArray, and BitStream types, between our
&lt;br&gt;&amp;quot;binary&amp;quot; and &amp;quot;io&amp;quot; module specifications.
&lt;br&gt;&lt;br&gt;&amp;gt; Binary/B feels largely right, but it has a few too many methods from Array
&lt;br&gt;&amp;gt; simply because Array had them for my taste, specifically things like sort,
&lt;br&gt;&amp;gt; reduce, shift, unshift etc.
&lt;br&gt;&lt;br&gt;In retrospect, I agree. &amp;nbsp;I think our ByteArray could survive with a
&lt;br&gt;very small subset of the Array API. &amp;nbsp;Would anyone miss any of: push,
&lt;br&gt;pop, shift, unshift, sort, reverse, splice, indexOf, lastIndexOf,
&lt;br&gt;split, filter, forEach, every, some, map, reduce, reduceRight,
&lt;br&gt;displace, extendLeft, extendRight. &amp;nbsp;I imagine that the primary use
&lt;br&gt;cases for ByteArray would be fixed-width, but explicitly growable with
&lt;br&gt;length assignment, pipes and buffers, for which the most common
&lt;br&gt;operations would copy(target, start, stop, targetStart) and conversion
&lt;br&gt;to other types.
&lt;br&gt;&lt;br&gt;&amp;gt; (1) Binary/B does not have a cheap way to convert from the immutable
&lt;br&gt;&amp;gt; representation (ByteString) to the mutable representation (ByteArray)
&lt;br&gt;&lt;br&gt;Apart from .toByteArray()? &amp;nbsp;I imagine that implementations would be
&lt;br&gt;able to track whether underlying buffer blocks are shared by multiple
&lt;br&gt;ByteString or ByteArray data instances and support copy-on-write for
&lt;br&gt;ByteArrays. &amp;nbsp;I'm probably missing something. &amp;nbsp;Perhaps you envision
&lt;br&gt;something lower-level?
&lt;br&gt;&lt;br&gt;&amp;gt; (2) In Binary/B, Array-like index access to ByteString gives back one-byte
&lt;br&gt;&amp;gt; ByteStrings instead of bytes, likely an over-literal copying of String
&lt;br&gt;&lt;br&gt;This has been mentioned, but there are certain values to over-literal
&lt;br&gt;copying; the notion is that certain algorithms written for Strings,
&lt;br&gt;albeit algorithms written for byte strings but suffering to do so with
&lt;br&gt;Strings, should continue to function with ByteString. &amp;nbsp;To that end, it
&lt;br&gt;may be desirable for certain idioms to continue to function properly:
&lt;br&gt;&lt;br&gt;&amp;nbsp; string[0].concat(string[1])
&lt;br&gt;&lt;br&gt;&amp;gt; (3) There are some seemingly needless differences in the interfaces to
&lt;br&gt;&amp;gt; ByteString and ByteArray that follow from modeling on String and Array
&lt;br&gt;&lt;br&gt;I am not sure.
&lt;br&gt;&lt;br&gt;&amp;gt; (4) Binary/B has many more operations available in the base proposal
&lt;br&gt;&amp;gt; (including charset transcoding and a generous selection of String and Array
&lt;br&gt;&amp;gt; methods)
&lt;br&gt;&lt;br&gt;I think it will be desirable to trim down the ByteArray proposal.
&lt;br&gt;&lt;br&gt;I don't recall where, but there's also some hint that it would be good
&lt;br&gt;to support conversion to various radix string representations,
&lt;br&gt;certainly 16 and 64, but possibly also 2, 8, and 32 (either to the RFC
&lt;br&gt;or Doug Crockford's proposal for human-error-resistant license keys).
&lt;br&gt;I think that these ought to be folded into .toString(radix:Number) in
&lt;br&gt;a future draft.
&lt;br&gt;&lt;br&gt;&amp;gt; (5) Different names - Data/DataBuilder vs. ByteString/ByteArray
&lt;br&gt;&lt;br&gt;I like ByteString. ByteArray is tending toward not being as strictly
&lt;br&gt;Array-like, but I think it's also apt, from the perspective of users
&lt;br&gt;implicitly understanding what kinds of operations are permitted on
&lt;br&gt;ByteArrays based on their understanding of Arrays, like mutability and
&lt;br&gt;resizability. &amp;nbsp;I definitely don't like Data and DataBuilder for the
&lt;br&gt;reasons Brendan outlined, but I definitely could see cases for Buffer
&lt;br&gt;and Blob.
&lt;br&gt;&lt;br&gt;&amp;gt; On (1): cheap conversion from mutable to immutable
&lt;br&gt;&amp;gt; (DataBuilder.prototype.release() in my proposal) lets binary data objects be
&lt;br&gt;&amp;gt; built up with a convenient mutation-based idiom, but then passed around as
&lt;br&gt;&amp;gt; immutable objects thereafter.
&lt;br&gt;&lt;br&gt;Ah, sure. &amp;nbsp;That makes sense. &amp;nbsp;My instinct is that under the hood, the
&lt;br&gt;original byte array would not actually disappear but switch to
&lt;br&gt;copy-on-write and transfer ownership of its underlying buffer to the
&lt;br&gt;new ByteString. &amp;nbsp;However, could this behavior not be folded up
&lt;br&gt;transparently by toByteString()?
&lt;br&gt;&lt;br&gt;&amp;gt; On (2): I don't think a one-byte ByteString is
&lt;br&gt;&amp;gt; ever useful, indexing to get the byte value would be much more helpful.
&lt;br&gt;&lt;br&gt;I agree this is debatable. I'm not ready to embark on a case study of
&lt;br&gt;existing uses of Strings for binary data in JavaScript to explore what
&lt;br&gt;methods are used, but there certainly is a corpus. &amp;nbsp;The works of Jacob
&lt;br&gt;Seidelin and Ama Chang come to mind; I've seen and massaged code for
&lt;br&gt;most radix encodings, charset encodings, hashing algorithms, EXIM,
&lt;br&gt;ID3, binary AJAX, ZIP archives, and the itinerant compression
&lt;br&gt;algorithms like LZ77. &amp;nbsp;They all use a combination of Array and String
&lt;br&gt;operations, all operating on the octet invariant. &amp;nbsp;It might be worth
&lt;br&gt;looking into how easily these projects can be ported to these API's.
&lt;br&gt;&lt;br&gt;&amp;gt; On (3), I think it's good for the mutable interface to be
&lt;br&gt;&amp;gt; a strict superset of
&lt;br&gt;&amp;gt; the the immutable interface.
&lt;br&gt;&lt;br&gt;Also, not sure. &amp;nbsp;I'm certain that there should be a body of common
&lt;br&gt;methods so they can be used generically, but I'm not sure that it
&lt;br&gt;should be exhaustive one way or the other. &amp;nbsp;Perhaps in the course of
&lt;br&gt;pruning ByteArray we'll converge on something a step away from
&lt;br&gt;ByteString.
&lt;br&gt;&lt;br&gt;&amp;gt; My initial impression is that (1), (2) and (3) are all points on which my
&lt;br&gt;&amp;gt; proposal is better.
&lt;br&gt;&amp;gt; (4) and (5) are all points where perhaps neither proposal is at the optimum
&lt;br&gt;&amp;gt; yet.
&lt;br&gt;&lt;br&gt;I think we can address (1) under the hood. &amp;nbsp;I'm not sure about (2) and
&lt;br&gt;(3); I've hitherto assumed that String/Array genericity would be
&lt;br&gt;valuable. (4) is also contentious; Binary/B does &amp;quot;entrain&amp;quot; a lot of
&lt;br&gt;necessary specification for charsets and radix encodings, although it
&lt;br&gt;rather deliberately avoids specifying API's for structure packing and
&lt;br&gt;unpacking.
&lt;br&gt;&lt;br&gt;&amp;gt; On (4), I suspect the sweet spot is somewhere between my spartan set of
&lt;br&gt;&amp;gt; built-in operations and the very generous set in Binary/B.
&lt;br&gt;&lt;br&gt;Agreed.
&lt;br&gt;&lt;br&gt;&amp;gt; On (5), I'm not
&lt;br&gt;&amp;gt; sure either set of names is the best possible, and I'm certainly not stuck
&lt;br&gt;&amp;gt; on my own proposed names.
&lt;br&gt;&lt;br&gt;Yes. It might be best to revisit nomenclature after the API's settle.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Kris Kowal
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26354066&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26354066.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26354060</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-14T13:33:27Z</published>
	<updated>2009-11-14T13:33:27Z</updated>
	<author>
		<name>Ash Berlin-5</name>
	</author>
	<content type="html">On Sat, 07 Nov 2009 19:17:48 -0800, Maciej Stachowiak 
&lt;br&gt;wrote:
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Mutable to immutable. Immutable to mutable has to copy (or at least 
&lt;br&gt;&amp;gt; copy-on-write).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My proposal does it like this (where DataBuilder is the mutable 
&lt;br&gt;&amp;gt; variant and Data is the immutable):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DataBuilder.prototype.release()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Return a new Data with the same length and the same byte values 
&lt;br&gt;&amp;gt; as the DataBuilder passed as the this value. At the same time, the 
&lt;br&gt;&amp;gt; DataBuilder is reset to length 0.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Because the DataBuilder is reset to empty, the implementation can 
&lt;br&gt;&amp;gt; &amp;quot;steal&amp;quot; its underlying buffer for the new Data object, thus converting 
&lt;br&gt;&amp;gt; to immutable without a full copy. This matches the common pattern of 
&lt;br&gt;&amp;gt; assembling a new piece of binary data with mutation, then handing it 
&lt;br&gt;&amp;gt; out to possibly multiple other pieces of code as immutable.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Seems like a good idea, but is this a case of baking too much
&lt;br&gt;implementation detail in the spec?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Yes, Brendan made this point and presented some good evidence in that 
&lt;br&gt;&amp;gt; direction. I think 'Data' doesn't work but 'Binary' or 'BinData' might.
&lt;br&gt;&lt;br&gt;Yay naming bike-shedding. Perhaps postponing the naming until later on in
&lt;br&gt;the process once the rest of the API is more concrete? 
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Something worth bearing in mind is that Binary/B is implemented in 2 
&lt;br&gt;&amp;gt;&amp;gt; or 3 CommonJS platforms already, but I don't think any one is 
&lt;br&gt;&amp;gt;&amp;gt; particularly attached to the behaviour so long as what comes out 
&lt;br&gt;&amp;gt;&amp;gt; isn't wildly different.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What kind of differences do you think they would tolerate? Renaming 
&lt;br&gt;&amp;gt; the classes? Dropping/changing some methods?
&lt;br&gt;&lt;br&gt;I haven't checked with anyone, but so long as there is a clear migration
&lt;br&gt;path I can't see anyone complaining too vocally.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26354060&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26354060.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26353646</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-14T12:34:38Z</published>
	<updated>2009-11-14T12:34:38Z</updated>
	<author>
		<name>Kris Kowal-2</name>
	</author>
	<content type="html">On Fri, Nov 6, 2009 at 11:24 AM, Brendan Eich &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26353646&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brendan@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Kris did a good job with Binary/B (although I do not see the point of the
&lt;br&gt;&amp;gt; .get method additions) -- I didn't look at the other proposals yet.
&lt;br&gt;&lt;br&gt;Thanks. &amp;nbsp;The .get method is certainly not relevant for an ECMAScript
&lt;br&gt;spec, where you have the luxury of specifying [[Get]] and [[Put]].
&lt;br&gt;The .get method in the CommonJS proposal is intended to serve as a
&lt;br&gt;stop-gap for implementations that cannot provide properties.
&lt;br&gt;&lt;br&gt;Kris Kowal
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26353646&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26353646.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26350059</id>
	<title>Re: getter &amp; setter for private objects</title>
	<published>2009-11-14T05:30:33Z</published>
	<updated>2009-11-14T05:30:33Z</updated>
	<author>
		<name>memolus@googlemail.com</name>
	</author>
	<content type="html">manager = function(object) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.init.apply(this, arguments);
&lt;br&gt;}
&lt;br&gt;manager.prototype = new function() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Private Properties */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var gui;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var obj;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Constructor */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.init = function(object) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;gui = new Gui();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj = object;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Property with both accessor and mutator */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.__defineGetter__(&amp;quot;modus&amp;quot;, function() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[..]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.__defineSetter__(&amp;quot;modus&amp;quot;, function(modus) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[..]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Privileged public method which affords access to private properties */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.getGui = function() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return gui;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Currently I'm able to set accessor and mutator for properties of &amp;quot;this&amp;quot;, but not
&lt;br&gt;on the lexical scope chain. I want e.g. &amp;quot;modus&amp;quot; to be private.
&lt;br&gt;&lt;br&gt;Anyway I hope you get what I mean. It's an
&lt;br&gt;evolutionary step to class support. Other programming languages
&lt;br&gt;support
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private int foo {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { [..] }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { [..] }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26350059&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/getter---setter-for-private-objects-tp26161773p26350059.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26278457</id>
	<title>Re: Function.prototype, [[Call]] and [[Construct]]</title>
	<published>2009-11-09T21:17:21Z</published>
	<updated>2009-11-09T21:17:21Z</updated>
	<author>
		<name>Juriy Zaytsev</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 10, 2009, at 12:10 AM, Garrett Smith wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, Nov 9, 2009 at 8:05 PM, Juriy Zaytsev &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278457&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kangax.dev@...&lt;/a&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Nov 9, 2009, at 6:50 PM, Garrett Smith wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; [[Construct]] of Function.prototype is not standardized.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If you look into Section 15 — Native ECMAScript Objects, you'll see &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; this
&lt;br&gt;&amp;gt;&amp;gt; rather clear explanation:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;[...] None of the built-in functions described in this section shall
&lt;br&gt;&amp;gt;&amp;gt; implement the internal [[Construct]] method unless otherwise &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; specified in
&lt;br&gt;&amp;gt;&amp;gt; the description of a particular function. None of the built-in &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; functions
&lt;br&gt;&amp;gt;&amp;gt; described in this section shall initially have a prototype property &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; unless
&lt;br&gt;&amp;gt;&amp;gt; otherwise specified in the description of a particular function. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; [...]&amp;quot;
&lt;/div&gt;&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So Function.prototype should not implement [[Construct]].
&lt;br&gt;&lt;br&gt;As far as I can see, no, it shouldn't.
&lt;br&gt;&lt;br&gt;WebKit (nightly) and Opera (10) conform here, throwing TypeError on &amp;nbsp;
&lt;br&gt;`new Function.prototype`, but Firefox (at least 3.5) erroneously &amp;nbsp;
&lt;br&gt;creates an object.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Garrett
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;kangax
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278457&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Function.prototype%2C---Call---and---Construct---tp26275940p26278457.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26278407</id>
	<title>Re: Function.prototype, [[Call]] and [[Construct]]</title>
	<published>2009-11-09T21:10:22Z</published>
	<updated>2009-11-09T21:10:22Z</updated>
	<author>
		<name>Garrett</name>
	</author>
	<content type="html">On Mon, Nov 9, 2009 at 8:05 PM, Juriy Zaytsev &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278407&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kangax.dev@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; On Nov 9, 2009, at 6:50 PM, Garrett Smith wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [[Construct]] of Function.prototype is not standardized.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;[...]
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you look into Section 15 — Native ECMAScript Objects, you'll see this
&lt;br&gt;&amp;gt; rather clear explanation:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;quot;[...] None of the built-in functions described in this section shall
&lt;br&gt;&amp;gt; implement the internal [[Construct]] method unless otherwise specified in
&lt;br&gt;&amp;gt; the description of a particular function. None of the built-in functions
&lt;br&gt;&amp;gt; described in this section shall initially have a prototype property unless
&lt;br&gt;&amp;gt; otherwise specified in the description of a particular function. [...]&amp;quot;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;That's pretty clear. I had interpreted that as meaning the global
&lt;br&gt;functions (eval, parseInt), but now I see that that text applies to
&lt;br&gt;the whole section 15, not just the function properties (as I had
&lt;br&gt;misread it).
&lt;br&gt;&lt;br&gt;&amp;gt; In fact, I mentioned this exact phrase when writing about bugs in various
&lt;br&gt;&amp;gt; browsers, revealed through Sputniktests web runner
&lt;br&gt;&amp;gt; (&lt;a href=&quot;http://thinkweb2.com/projects/prototype/sputniktests-web-runner/#construct-and-prototype-of-builtins&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://thinkweb2.com/projects/prototype/sputniktests-web-runner/#construct-and-prototype-of-builtins&lt;/a&gt;).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And as I said in a post, Firefox and Chrome, for example, fail a whole bunch
&lt;br&gt;&amp;gt; of tests due to most of built-in methods (like `Array.prototype.toString`,
&lt;br&gt;&amp;gt; `parseInt` or `String.prototype.slice`) implementing [[Construct]] and
&lt;br&gt;&amp;gt; having .prototype properties.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;So Function.prototype should not implement [[Construct]].
&lt;br&gt;&lt;br&gt;Garrett
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278407&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Function.prototype%2C---Call---and---Construct---tp26275940p26278407.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26278002</id>
	<title>Re: Function.prototype, [[Call]] and [[Construct]]</title>
	<published>2009-11-09T20:05:11Z</published>
	<updated>2009-11-09T20:05:11Z</updated>
	<author>
		<name>Juriy Zaytsev</name>
	</author>
	<content type="html">On Nov 9, 2009, at 6:50 PM, Garrett Smith wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; [[Construct]] of Function.prototype is not standardized.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The definition of Function.prototype does not define the expected
&lt;br&gt;&amp;gt; behavior for [[Call]] or [[Construct]]. Instead, there is a
&lt;br&gt;&amp;gt; description of what happens when it is invoked:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; | 15.3.4 Properties of the Function Prototype Object
&lt;br&gt;&amp;gt; | &amp;nbsp;The Function prototype object is itself a Function
&lt;br&gt;&amp;gt; | object (its [[Class]] is &amp;quot;Function&amp;quot;) that, when
&lt;br&gt;&amp;gt; | invoked, accepts any arguments and returns undefined.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Should Function.prototype implement [[Construct]]? Either way, the
&lt;br&gt;&amp;gt; specification should state the outcome.
&lt;/div&gt;&lt;br&gt;Yes, it's a slightly tricky one :) I was wading through Sputniktests &amp;nbsp;
&lt;br&gt;suite couple of days ago (when finishing web runner — &lt;a href=&quot;http://thinkweb2.com/projects/prototype/sputniktests-web-runner/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://thinkweb2.com/projects/prototype/sputniktests-web-runner/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;) and noticed that there were assertions for exactly this kind of &amp;nbsp;
&lt;br&gt;compliance.
&lt;br&gt;&lt;br&gt;I even filed a bug with Sputniktests, thinking that they make &amp;nbsp;
&lt;br&gt;incorrect assumptions — &lt;a href=&quot;http://code.google.com/p/sputniktests/issues/detail?id=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/sputniktests/issues/detail?id=11&lt;/a&gt;&lt;br&gt;&lt;br&gt;However, then I realized that specs do in fact mention this &amp;nbsp;
&lt;br&gt;explicitly, although not directly under these specific sections.
&lt;br&gt;&lt;br&gt;If you look into Section 15 — Native ECMAScript Objects, you'll see &amp;nbsp;
&lt;br&gt;this rather clear explanation:
&lt;br&gt;&lt;br&gt;&amp;quot;[...] None of the built-in functions described in this section shall &amp;nbsp;
&lt;br&gt;implement the internal [[Construct]] method unless otherwise specified &amp;nbsp;
&lt;br&gt;in the description of a particular function. None of the built-in &amp;nbsp;
&lt;br&gt;functions described in this section shall initially have a prototype &amp;nbsp;
&lt;br&gt;property unless otherwise specified in the description of a particular &amp;nbsp;
&lt;br&gt;function. [...]&amp;quot;
&lt;br&gt;&lt;br&gt;In fact, I mentioned this exact phrase when writing about bugs in &amp;nbsp;
&lt;br&gt;various browsers, revealed through Sputniktests web runner (&lt;a href=&quot;http://thinkweb2.com/projects/prototype/sputniktests-web-runner/#construct-and-prototype-of-builtins&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://thinkweb2.com/projects/prototype/sputniktests-web-runner/#construct-and-prototype-of-builtins&lt;/a&gt;&amp;nbsp;
&lt;br&gt;).
&lt;br&gt;&lt;br&gt;And as I said in a post, Firefox and Chrome, for example, fail a whole &amp;nbsp;
&lt;br&gt;bunch of tests due to most of built-in methods (like &amp;nbsp;
&lt;br&gt;`Array.prototype.toString`, `parseInt` or `String.prototype.slice`) &amp;nbsp;
&lt;br&gt;implementing [[Construct]] and having .prototype properties.
&lt;br&gt;&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;kangax
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278002&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Function.prototype%2C---Call---and---Construct---tp26275940p26278002.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26275940</id>
	<title>Function.prototype, [[Call]] and [[Construct]]</title>
	<published>2009-11-09T15:50:24Z</published>
	<updated>2009-11-09T15:50:24Z</updated>
	<author>
		<name>Garrett</name>
	</author>
	<content type="html">[[Construct]] of Function.prototype is not standardized.
&lt;br&gt;&lt;br&gt;The definition of Function.prototype does not define the expected
&lt;br&gt;behavior for [[Call]] or [[Construct]]. Instead, there is a
&lt;br&gt;description of what happens when it is invoked:
&lt;br&gt;&lt;br&gt;| 15.3.4 Properties of the Function Prototype Object
&lt;br&gt;| &amp;nbsp;The Function prototype object is itself a Function
&lt;br&gt;| object (its [[Class]] is &amp;quot;Function&amp;quot;) that, when
&lt;br&gt;| invoked, accepts any arguments and returns undefined.
&lt;br&gt;&lt;br&gt;Should Function.prototype implement [[Construct]]? Either way, the
&lt;br&gt;specification should state the outcome.
&lt;br&gt;&lt;br&gt;Trying it out:
&lt;br&gt;&lt;br&gt;javascript: alert( new Function.prototype );
&lt;br&gt;&lt;br&gt;IE 6-8:
&lt;br&gt;Error: Object doesn't support this action
&lt;br&gt;&lt;br&gt;Other browsers tested return an Object, indicating the [[Construct]]
&lt;br&gt;is implemented.
&lt;br&gt;&lt;br&gt;The specification should state whether or not Function.prototype
&lt;br&gt;implements [[Construct]], to clarify expected outcome, and to
&lt;br&gt;encourage consistent implementations.
&lt;br&gt;&lt;br&gt;Garrett
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26275940&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Function.prototype%2C---Call---and---Construct---tp26275940p26275940.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260570</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-08T18:54:29Z</published>
	<updated>2009-11-08T18:54:29Z</updated>
	<author>
		<name>Daniel Friesen-4</name>
	</author>
	<content type="html">Maciej Stachowiak wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 7, 2009, at 5:39 AM, Ash Berlin wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 6 Nov 2009, at 19:24, Brendan Eich wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Nov 6, 2009, at 10:44 AM, Dean Landolt wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Just in case some of you weren't aware, the CommonJS group has done 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; quite a bit of work and (bikeshedding) on this topic. Here's a link 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to the wiki:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://wiki.commonjs.org/wiki/Binary&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.commonjs.org/wiki/Binary&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Binary/B is the closest of the three proposals to mine, in that it has 
&lt;br&gt;&amp;gt; both mutable and immutable binary data containers. Here are a few key 
&lt;br&gt;&amp;gt; differences:
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Maciej
&lt;/div&gt;One note, Binary/C also originally had a mutable and an immutable type. 
&lt;br&gt;The mutable type was moved to IO/B/Buffer 
&lt;br&gt;(&lt;a href=&quot;http://wiki.commonjs.org/wiki/IO/B/Buffer&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.commonjs.org/wiki/IO/B/Buffer&lt;/a&gt;), when comparing to Binary/B, 
&lt;br&gt;Binary/C together with IO/B/Buffer is more equivalent a comparison.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~Daniel Friesen (Dantman, Nadir-Seen-Fire) [&lt;a href=&quot;http://daniel.friesen.name&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://daniel.friesen.name&lt;/a&gt;]
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260570&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26260570.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26250705</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-07T19:17:48Z</published>
	<updated>2009-11-07T19:17:48Z</updated>
	<author>
		<name>Maciej Stachowiak</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On Nov 7, 2009, at 6:53 PM, Ash Berlin wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On 8 Nov 2009, at 02:21, Maciej Stachowiak wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On Nov 7, 2009, at 5:39 AM, Ash Berlin wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;On 6 Nov 2009, at 19:24, Brendan Eich wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;On Nov 6, 2009, at 10:44 AM, Dean Landolt wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;a href=&quot;http://wiki.commonjs.org/wiki/Binary&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.commonjs.org/wiki/Binary&lt;/a&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;[snip]&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;[snip]&lt;/div&gt;&lt;div&gt;As a community (CommonJS) we'd be more than happy to go forward with a binary spec that came from (or at least has the blessing of) the ES groups&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Binary/B is the closest of the three proposals to mine, in that it has both mutable and immutable binary data containers. Here are a few key differences:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(1) Binary/B does not have a cheap way to convert from the immutable representation (ByteString) to the mutable representation (ByteArray)&lt;/div&gt;&lt;div&gt;(2) In Binary/B, Array-like index access to ByteString gives back one-byte ByteStrings instead of bytes, likely an over-literal copying of String&lt;/div&gt;&lt;div&gt;(3) There are some seemingly needless differences in the interfaces to ByteString and ByteArray that follow from modeling on String and Array&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div&gt;(4) Binary/B has many more operations available in the base proposal (including charset transcoding and a generous selection of String and Array methods)&lt;/div&gt;&lt;div&gt;(5) Different names - Data/DataBuilder vs. ByteString/ByteArray&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;On (1): cheap conversion from mutable to immutable (DataBuilder.prototype.release() in my proposal) lets binary data objects be built up with a convenient mutation-based idiom, but then passed around as immutable objects thereafter. &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Mutable to immutable or immutable to mutable? Assuming the former, how do you handle the differences in API/behaviour? each function checks wether it is now immutable?&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Mutable to immutable. Immutable to mutable has to copy (or at least copy-on-write).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;My proposal does it like this (where DataBuilder is the mutable variant and Data is the immutable):&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;DataBuilder.prototype.release()&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Return a new Data with the same length and the same byte values as the DataBuilder passed as the this value. At the same time, the DataBuilder is reset to length 0.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Because the DataBuilder is reset to empty, the implementation can &quot;steal&quot; its underlying buffer for the new Data object, thus converting to immutable without a full copy. This matches the common pattern of assembling a new piece of binary data with mutation, then handing it out to possibly multiple other pieces of code as immutable.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;On (2): I don't think a one-byte ByteString is ever useful, indexing to get the byte value would be much more helpful. &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Couldn't agree more with you here - if for whatever reason you do want a one-byte ByteString, there is always substr/substring. This is something that came up recently in IRC and prompted me to start looking at making changes to the proposal - I was going to do that next week, so this coming up now is very good timing.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;On (3), I think it's good for the mutable interface to be a strict superset of the the immutable interface.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Seems like a reasonable thing to do.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I'm glad we agree on these two points.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(4) and (5) are all points where perhaps neither proposal is at the optimum yet. On (4), I suspect the sweet spot is somewhere between my spartan set of built-in operations and the very generous set in Binary/B.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Agreed - this was the other thing i noticed - e.g. sorting a ByteArray isn't really an operation that makes a whole lot of sense to my mind.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Yep. I'm not even sure things like map(), filter() or reduce() are likely to work well. My own preference is to start the API very small, and add incrementally based on demonstrated need and clearly articulated use cases.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt; On (5), I'm not sure either set of names is the best possible, and I'm certainly not stuck on my own proposed names.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I'm not really bothered either way on this front, although 'Data' is much more likely to clash with existing code.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Yes, Brendan made this point and presented some good evidence in that direction. I think 'Data' doesn't work but 'Binary' or 'BinData' might.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Something worth bearing in mind is that Binary/B is implemented in 2 or 3 CommonJS platforms already, but I don't think any one is particularly attached to the behaviour so long as what comes out isn't wildly different.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;What kind of differences do you think they would tolerate? Renaming the classes? Dropping/changing some methods?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Regards,&lt;/div&gt;&lt;div&gt;Maciej&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26250705&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26250705.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26250602</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-07T18:53:59Z</published>
	<updated>2009-11-07T18:53:59Z</updated>
	<author>
		<name>Ash Berlin-5</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On 8 Nov 2009, at 02:21, Maciej Stachowiak wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On Nov 7, 2009, at 5:39 AM, Ash Berlin wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;On 6 Nov 2009, at 19:24, Brendan Eich wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;On Nov 6, 2009, at 10:44 AM, Dean Landolt wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;a href=&quot;http://wiki.commonjs.org/wiki/Binary&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.commonjs.org/wiki/Binary&lt;/a&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;[snip]&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;[snip]&lt;/div&gt;&lt;div&gt;As a community (CommonJS) we'd be more than happy to go forward with a binary spec that came from (or at least has the blessing of) the ES groups&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Binary/B is the closest of the three proposals to mine, in that it has both mutable and immutable binary data containers. Here are a few key differences:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(1) Binary/B does not have a cheap way to convert from the immutable representation (ByteString) to the mutable representation (ByteArray)&lt;/div&gt;&lt;div&gt;(2) In Binary/B, Array-like index access to ByteString gives back one-byte ByteStrings instead of bytes, likely an over-literal copying of String&lt;/div&gt;&lt;div&gt;(3) There are some seemingly needless differences in the interfaces to ByteString and ByteArray that follow from modeling on String and Array&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div&gt;(4) Binary/B has many more operations available in the base proposal (including charset transcoding and a generous selection of String and Array methods)&lt;/div&gt;&lt;div&gt;(5) Different names - Data/DataBuilder vs. ByteString/ByteArray&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;On (1): cheap conversion from mutable to immutable (DataBuilder.prototype.release() in my proposal) lets binary data objects be built up with a convenient mutation-based idiom, but then passed around as immutable objects thereafter. &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Mutable to immutable or immutable to mutable? Assuming the former, how do you handle the differences in API/behaviour? each function checks wether it is now immutable?&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;On (2): I don't think a one-byte ByteString is ever useful, indexing to get the byte value would be much more helpful. &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Couldn't agree more with you here - if for whatever reason you do want a one-byte ByteString, there is always substr/substring. This is something that came up recently in IRC and prompted me to start looking at making changes to the proposal - I was going to do that next week, so this coming up now is very good timing.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;On (3), I think it's good for the mutable interface to be a strict superset of the the immutable interface.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Seems like a reasonable thing to do.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(4) and (5) are all points where perhaps neither proposal is at the optimum yet. On (4), I suspect the sweet spot is somewhere between my spartan set of built-in operations and the very generous set in Binary/B.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Agreed - this was the other thing i noticed - e.g. sorting a ByteArray isn't really an operation that makes a whole lot of sense to my mind.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt; On (5), I'm not sure either set of names is the best possible, and I'm certainly not stuck on my own proposed names.&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I'm not really bothered either way on this front, although 'Data' is much more likely to clash with existing code.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Regards,&lt;/div&gt;&lt;div&gt;Maciej&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Something worth bearing in mind is that Binary/B is implemented in 2 or 3 CommonJS platforms already, but I don't think any one is particularly attached to the behaviour so long as what comes out isn't wildly different.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-ash&amp;nbsp;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26250602&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26250602.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26250476</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-07T18:21:17Z</published>
	<updated>2009-11-07T18:21:17Z</updated>
	<author>
		<name>Maciej Stachowiak</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On Nov 7, 2009, at 5:39 AM, Ash Berlin wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;On 6 Nov 2009, at 19:24, Brendan Eich wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;On Nov 6, 2009, at 10:44 AM, Dean Landolt wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;Just in case some of you weren't aware, the CommonJS group has done quite a bit of work and (bikeshedding) on this topic. Here's a link to the wiki:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://wiki.commonjs.org/wiki/Binary&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.commonjs.org/wiki/Binary&lt;/a&gt;&lt;br&gt;&lt;br&gt;If nothing else there's quite a bit of prior art collected which should inform the conversation. I know the Binary/B proposal has the implementation momentum, but I don't know exactly what the status is. I haven't been closely following the evolution of these binary specs too closely but since it seems that nearly everyone else from the group is off to jsconf.eu I figured I ought to toss this out there.&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Thanks, I had forgotten about commonjs.org, having once paid better attention.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Kris did a good job with Binary/B (although I do not see the point of the .get method additions) -- I didn't look at the other proposals yet.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;/be&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Binary/B feels largely right, but it has a few too many methods from Array simply because Array had them for my taste, specifically things like sort, reduce, shift, unshift etc.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Conceptually: why would you want to sort an array of bytes? There are certainly classes of operations that I think should just be done via b.toArray().X rather than directly on the blob.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;As a community (CommonJS) we'd be more than happy to go forward with a binary spec that came from (or at least has the blessing of) the ES groups&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Binary/B is the closest of the three proposals to mine, in that it has both mutable and immutable binary data containers. Here are a few key differences:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(1) Binary/B does not have a cheap way to convert from the immutable representation (ByteString) to the mutable representation (ByteArray)&lt;/div&gt;&lt;div&gt;(2) In Binary/B, Array-like index access to ByteString gives back one-byte ByteStrings instead of bytes, likely an over-literal copying of String&lt;/div&gt;&lt;div&gt;(3) There are some seemingly needless differences in the interfaces to ByteString and ByteArray that follow from modeling on String and Array&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div&gt;(4) Binary/B has many more operations available in the base proposal (including charset transcoding and a generous selection of String and Array methods)&lt;/div&gt;&lt;div&gt;(5) Different names - Data/DataBuilder vs. ByteString/ByteArray&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;My initial impression is that (1), (2) and (3) are all points on which my proposal is better. On (1): cheap conversion from mutable to immutable (DataBuilder.prototype.release() in my proposal) lets binary data objects be built up with a convenient mutation-based idiom, but then passed around as immutable objects thereafter. On (2): I don't think a one-byte ByteString is ever useful, indexing to get the byte value would be much more helpful. On (3), I think it's good for the mutable interface to be a strict superset of the the immutable interface.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(4) and (5) are all points where perhaps neither proposal is at the optimum yet. On (4), I suspect the sweet spot is somewhere between my spartan set of built-in operations and the very generous set in Binary/B. On (5), I'm not sure either set of names is the best possible, and I'm certainly not stuck on my own proposed names.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Regards,&lt;/div&gt;&lt;div&gt;Maciej&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26250476&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26250476.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26247811</id>
	<title>Re: Presentation on modules</title>
	<published>2009-11-07T11:27:19Z</published>
	<updated>2009-11-07T11:27:19Z</updated>
	<author>
		<name>ihab.awad</name>
	</author>
	<content type="html">On Sat, Nov 7, 2009 at 11:10 AM, Brendan Eich &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26247811&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brendan@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; The alternative for Harmony is a syntactic special form, an import directive
&lt;br&gt;&amp;gt; for example, that can be analyzed when the program is parsed ...
&lt;br&gt;&lt;br&gt;+1. In Caja, we were loath to introduce new syntax _per se_, and we
&lt;br&gt;are already compiling, so ours is a bit of a special case. Were there
&lt;br&gt;some standard syntax the semantics of which we could implement, our
&lt;br&gt;lives would be far easier.
&lt;br&gt;&lt;br&gt;Ihab
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ihab A.B. Awad, Palo Alto, CA
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26247811&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Presentation-on-modules-tp26246317p26247811.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26247661</id>
	<title>Re: Presentation on modules</title>
	<published>2009-11-07T11:10:21Z</published>
	<updated>2009-11-07T11:10:21Z</updated>
	<author>
		<name>Brendan Eich-3</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;So (as was clarified at the meeting) the Caja work is quite informative, but we are not looking at any Harmony module system that &lt;i&gt;requires&lt;/i&gt; ahead-of-time code analysis and transformation before code reaches the browser.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The alternative for Harmony is a syntactic special form, an import directive for example, that can be analyzed when the program is parsed (not executed), so the implementation can preload all dependencies before execution to avoid blocking on an import (or a later data dependency), or else an awkward non-blocking import to preserve JS's run-to-completion execution model.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Async (non-blocking) import functionality (a runtime API) is good too but it should not be the only way, or the common way.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;There's more to say about modules but I'll let others speak up.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;/be&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On Nov 7, 2009, at 9:03 AM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26247661&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ihab.awad@...&lt;/a&gt; wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div&gt;On Sat, Nov 7, 2009 at 8:34 AM, Ash Berlin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26247661&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ash_js@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;Slide 10 says &quot;Sync, arg must be a string literal&quot;. 1) why a string&lt;br&gt;&lt;/blockquote&gt;&lt;blockquote type=&quot;cite&quot;&gt;*literal*, ...&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;It's the simplest form of statically determinable identifier. We could&lt;br&gt;say, &quot;arg must be an expression that statically evaluates to a&lt;br&gt;string&quot;, like:&lt;br&gt;&lt;br&gt; &amp;nbsp;'f' + 'oo'&lt;br&gt;&lt;br&gt;but we chose the simplest interpretation.&lt;br&gt;&lt;br&gt;Essentially, we are making 'load' a special form.&lt;br&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;... and 2) how can that be enforced?&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;The Caja system is a compiler. :)&lt;br&gt;&lt;br&gt;Ihab&lt;br&gt;&lt;br&gt;-- &lt;br&gt;Ihab A.B. Awad, Palo Alto, CA&lt;br&gt;_______________________________________________&lt;br&gt;es-discuss mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26247661&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;&lt;br&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26247661&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Presentation-on-modules-tp26246317p26247661.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26246629</id>
	<title>Re: Presentation on modules</title>
	<published>2009-11-07T09:03:58Z</published>
	<updated>2009-11-07T09:03:58Z</updated>
	<author>
		<name>ihab.awad</name>
	</author>
	<content type="html">On Sat, Nov 7, 2009 at 8:34 AM, Ash Berlin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26246629&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ash_js@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Slide 10 says &amp;quot;Sync, arg must be a string literal&amp;quot;. 1) why a string
&lt;br&gt;&amp;gt; *literal*, ...
&lt;br&gt;&lt;br&gt;It's the simplest form of statically determinable identifier. We could
&lt;br&gt;say, &amp;quot;arg must be an expression that statically evaluates to a
&lt;br&gt;string&amp;quot;, like:
&lt;br&gt;&lt;br&gt;&amp;nbsp; 'f' + 'oo'
&lt;br&gt;&lt;br&gt;but we chose the simplest interpretation.
&lt;br&gt;&lt;br&gt;Essentially, we are making 'load' a special form.
&lt;br&gt;&lt;br&gt;&amp;gt; ... and 2) how can that be enforced?
&lt;br&gt;&lt;br&gt;The Caja system is a compiler. :)
&lt;br&gt;&lt;br&gt;Ihab
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ihab A.B. Awad, Palo Alto, CA
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26246629&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Presentation-on-modules-tp26246317p26246629.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26246368</id>
	<title>Re: Presentation on modules</title>
	<published>2009-11-07T08:34:47Z</published>
	<updated>2009-11-07T08:34:47Z</updated>
	<author>
		<name>Ash Berlin-5</name>
	</author>
	<content type="html">&lt;br&gt;On 7 Nov 2009, at 16:28, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26246368&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ihab.awad@...&lt;/a&gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi folks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here is a link to the presentation on modules I gave during the TC39
&lt;br&gt;&amp;gt; meeting in Santa Clara, CA yesterday.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;&lt;a href=&quot;http://sites.google.com/site/ihabawad/Home/es5Modules-2009-11-06.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/ihabawad/Home/es5Modules-2009-11-06.pdf&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers and regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ihab
&lt;/div&gt;&lt;br&gt;Slide 10 says &amp;quot;Sync, arg must be a string literal&amp;quot;. 1) why a string &amp;nbsp;
&lt;br&gt;*literal*, and 2) how can that be enforced?
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26246368&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Presentation-on-modules-tp26246317p26246368.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26246317</id>
	<title>Presentation on modules</title>
	<published>2009-11-07T08:28:32Z</published>
	<updated>2009-11-07T08:28:32Z</updated>
	<author>
		<name>ihab.awad</name>
	</author>
	<content type="html">Hi folks,
&lt;br&gt;&lt;br&gt;Here is a link to the presentation on modules I gave during the TC39
&lt;br&gt;meeting in Santa Clara, CA yesterday.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://sites.google.com/site/ihabawad/Home/es5Modules-2009-11-06.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/ihabawad/Home/es5Modules-2009-11-06.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;Cheers and regards,
&lt;br&gt;&lt;br&gt;Ihab
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ihab A.B. Awad, Palo Alto, CA
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26246317&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Presentation-on-modules-tp26246317p26246317.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26244891</id>
	<title>Re: Binary Data - possible topic for joint session</title>
	<published>2009-11-07T05:39:35Z</published>
	<updated>2009-11-07T05:39:35Z</updated>
	<author>
		<name>Ash Berlin-5</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;On 6 Nov 2009, at 19:24, Brendan Eich wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;On Nov 6, 2009, at 10:44 AM, Dean Landolt wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;Just in case some of you weren't aware, the CommonJS group has done quite a bit of work and (bikeshedding) on this topic. Here's a link to the wiki:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://wiki.commonjs.org/wiki/Binary&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.commonjs.org/wiki/Binary&lt;/a&gt;&lt;br&gt;&lt;br&gt;If nothing else there's quite a bit of prior art collected which should inform the conversation. I know the Binary/B proposal has the implementation momentum, but I don't know exactly what the status is. I haven't been closely following the evolution of these binary specs too closely but since it seems that nearly everyone else from the group is off to jsconf.eu I figured I ought to toss this out there.&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Thanks, I had forgotten about commonjs.org, having once paid better attention.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Kris did a good job with Binary/B (although I do not see the point of the .get method additions) -- I didn't look at the other proposals yet.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;/be&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Binary/B feels largely right, but it has a few too many methods from Array simply because Array had them for my taste, specifically things like sort, reduce, shift, unshift etc.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Conceptually: why would you want to sort an array of bytes? There are certainly classes of operations that I think should just be done via b.toArray().X rather than directly on the blob.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;As a community (CommonJS) we'd be more than happy to go forward with a binary spec that came from (or at least has the blessing of) the ES groups&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-ash&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26244891&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Binary-Data---possible-topic-for-joint-session-tp26229087p26244891.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26240363</id>
	<title>Re: Binary data (ByteArray/ByteVector) proposal on public-script-coord</title>
	<published>2009-11-06T15:39:37Z</published>
	<updated>2009-11-06T15:39:37Z</updated>
	<author>
		<name>Maciej Stachowiak</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 6, 2009, at 1:39 PM, Alex Russell wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Nov 6, 2009, at 11:30 AM, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Nov 6, 2009, at 5:43 AM, P T Withington wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On 2009-11-05, at 19:42, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; My claim is that Data is not much like these things. I believe it &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is more like String. It happens to be a sequence (of a very &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; specific type), but it's specialized enough to be worth treating &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; differently. Do people often regret that String is not an Array?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Data is like an 8-bit &amp;quot;null encoded&amp;quot; String. &amp;nbsp;Which makes me &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; wonder if you really just want to extend String to allow different &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; encodings. &amp;nbsp;But I also regret String not being and Array. &amp;nbsp;Others &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; must have too, because at one point I'm sure there was a proposal &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to make [] on string mean charAt?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ES5 does have bracket index access to the individual characters. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; But it does not make String inherit from Array.prototype, or add &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; all of the Array methods. To make it more concrete, have you ever &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; wished you could use methods like map(), filter(), reduce() or &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; join() on a String?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; join's an oddball since it's effectively a no-op, but map() and &amp;nbsp;
&lt;br&gt;&amp;gt; filter(), absolutely.
&lt;/div&gt;&lt;br&gt;Can you give specific use cases for these, maybe with hypothetical &amp;nbsp;
&lt;br&gt;code examples?
&lt;br&gt;&lt;br&gt;Join would not be a no-op, and indeed you can use Array.prototype.join &amp;nbsp;
&lt;br&gt;on a String today:
&lt;br&gt;&lt;br&gt;javascript:alert(Array.prototype.join.call(&amp;quot;abcde&amp;quot;, &amp;quot;123&amp;quot;)) ==&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;quot;a123b123c123d123e&amp;quot;
&lt;br&gt;&lt;br&gt;Not a no-op but I'm not sure it's useful.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Maciej
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26240363&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Binary-data-%28ByteArray-ByteVector%29-proposal-on-public-script-coord-tp26223706p26240363.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26239053</id>
	<title>Re: Binary data (ByteArray/ByteVector) proposal on  public-script-coord</title>
	<published>2009-11-06T13:43:37Z</published>
	<updated>2009-11-06T13:43:37Z</updated>
	<author>
		<name>Mike Shaver</name>
	</author>
	<content type="html">On Fri, Nov 6, 2009 at 4:39 PM, Alex Russell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239053&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;alex@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; On Nov 6, 2009, at 11:30 AM, Maciej Stachowiak wrote:
&lt;br&gt;&amp;gt;&amp;gt; ES5 does have bracket index access to the individual characters. But it
&lt;br&gt;&amp;gt;&amp;gt; does not make String inherit from Array.prototype, or add all of the Array
&lt;br&gt;&amp;gt;&amp;gt; methods. To make it more concrete, have you ever wished you could use
&lt;br&gt;&amp;gt;&amp;gt; methods like map(), filter(), reduce() or join() on a String?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; join's an oddball since it's effectively a no-op, but map() and filter(),
&lt;br&gt;&amp;gt; absolutely.
&lt;br&gt;&lt;br&gt;I've used join too (though not with an empty separator, indeed), and
&lt;br&gt;map/filter for various string pack and encode operations, but I don't
&lt;br&gt;think that I would mind too much having to say
&lt;br&gt;&lt;br&gt;Array.join(strOrDataThing, &amp;quot;\n&amp;quot;);
&lt;br&gt;&lt;br&gt;instead of
&lt;br&gt;&lt;br&gt;strOrData.filter(function (v) { return v.charCodeAt(0) &amp;lt; 128; });
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;_______________________________________________
&lt;br&gt;es-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239053&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mail.mozilla.org/listinfo/es-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mail.mozilla.org/listinfo/es-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Binary-data-%28ByteArray-ByteVector%29-proposal-on-public-script-coord-tp26223706p26239053.html" />
</entry>

</feed>
