<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JS2/ES4</title>
	<atom:link href="http://www.weaselhat.com/2007/11/30/js2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weaselhat.com/2007/11/30/js2/</link>
	<description></description>
	<lastBuildDate>Tue, 25 Oct 2011 15:23:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Brendan Eich</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-298</link>
		<dc:creator>Brendan Eich</dc:creator>
		<pubDate>Fri, 28 Dec 2007 05:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-298</guid>
		<description>Hi Leo, I hope I am reading your comment @1:50 am correctly. The four paragraphs there consist of these six points from what I can tell (my interpretations and responses in parens, please correct me if I&#039;m misreading you):

1a. parsing slowness is tolerable (eval, but also script tag handling source download)
1b. use parallel parsing (I&#039;m with you, as much as we can without breaking the DOM run-to-completion execution model)
1c. use intermediate formats (over the wire, presumably -- here I&#039;m less enthusiastic -- view-source is a virtue of the web, almost unique in widely used programmable systems)

2. Structural or nominal subtyping? (both, see the evolutionary programming tutorial at http://www.ecmascript.org/es4/spec/evolutionary-programming-tutorial.pdf)

3. TI uncertainty with deferred technical debate to avoid crowding Mike&#039;s blog, and then words that I interpret as meaning that you thought the ES4 type system was only for the strict-mode type checker, not for standard-mode runtime semantics -- that type annotations by default are merely documentation. (Not so: the type system is for both strict and standard modes: a type annotation in standard mode means runtime checking on every write to the annotated variable.)

4. References to Cormac Flanagan&#039;s work, also Phil Wadler&#039;s work (again seeming to suggest you think ES4 in standard mode ignores type annotations).

I hope this helps us understand each other. Mainly I hope to clarify that type annotations have runtime effects in standard mode, and we have thought about contracts a bit (mostly Dave Herman has; Robbie Findler pulled my ear convincingly at ICFP 2005 too), but we have deferred them to a future edition. We believe that the current ES4 proposals are future-proof -- there is room in the type annotation syntax for distinguished, statically undecidable value assertions. See http://wiki.ecmascript.org/doku.php?id=proposals:contracts.

Let me try to respond coherently to your latest comment:

* We&#039;re agreed on wanting to target mobile devices. We are connected to Ras Bodik and his team at UCB (http://parallelbrowser.blogspot.com/2007/09/hello-world.html). More on this in due course.

* Nevertheless, we do not intend to standardize a JS (ECMAScript) IR any time soon. If we do reach this promised land, it will probably be an arithmetically coded AST, so both the web-standard (and still crucial) view-source advantage, and guaranteed &quot;safe semantics for valid syntax&quot; guarantee (see http://portal.acm.org/citation.cfm?id=1269696&amp;dl=&amp;coll=GUIDE), still apply.

* ES4 preserves ES3/JS1&#039;s ability for late-loaded code to upset arbitrary invariants, but allows new code to &quot;opt in&quot; to immutable type and other bindings, &#039;like&#039;-typed API arguments and results, type-annotated code, etc.

Hope this helps,

/be</description>
		<content:encoded><![CDATA[<p>Hi Leo, I hope I am reading your comment @1:50 am correctly. The four paragraphs there consist of these six points from what I can tell (my interpretations and responses in parens, please correct me if I&#8217;m misreading you):</p>
<p>1a. parsing slowness is tolerable (eval, but also script tag handling source download)<br />
1b. use parallel parsing (I&#8217;m with you, as much as we can without breaking the DOM run-to-completion execution model)<br />
1c. use intermediate formats (over the wire, presumably &#8212; here I&#8217;m less enthusiastic &#8212; view-source is a virtue of the web, almost unique in widely used programmable systems)</p>
<p>2. Structural or nominal subtyping? (both, see the evolutionary programming tutorial at <a href="http://www.ecmascript.org/es4/spec/evolutionary-programming-tutorial.pdf" rel="nofollow">http://www.ecmascript.org/es4/spec/evolutionary-programming-tutorial.pdf</a>)</p>
<p>3. TI uncertainty with deferred technical debate to avoid crowding Mike&#8217;s blog, and then words that I interpret as meaning that you thought the ES4 type system was only for the strict-mode type checker, not for standard-mode runtime semantics &#8212; that type annotations by default are merely documentation. (Not so: the type system is for both strict and standard modes: a type annotation in standard mode means runtime checking on every write to the annotated variable.)</p>
<p>4. References to Cormac Flanagan&#8217;s work, also Phil Wadler&#8217;s work (again seeming to suggest you think ES4 in standard mode ignores type annotations).</p>
<p>I hope this helps us understand each other. Mainly I hope to clarify that type annotations have runtime effects in standard mode, and we have thought about contracts a bit (mostly Dave Herman has; Robbie Findler pulled my ear convincingly at ICFP 2005 too), but we have deferred them to a future edition. We believe that the current ES4 proposals are future-proof &#8212; there is room in the type annotation syntax for distinguished, statically undecidable value assertions. See <a href="http://wiki.ecmascript.org/doku.php?id=proposals:contracts" rel="nofollow">http://wiki.ecmascript.org/doku.php?id=proposals:contracts</a>.</p>
<p>Let me try to respond coherently to your latest comment:</p>
<p>* We&#8217;re agreed on wanting to target mobile devices. We are connected to Ras Bodik and his team at UCB (<a href="http://parallelbrowser.blogspot.com/2007/09/hello-world.html" rel="nofollow">http://parallelbrowser.blogspot.com/2007/09/hello-world.html</a>). More on this in due course.</p>
<p>* Nevertheless, we do not intend to standardize a JS (ECMAScript) IR any time soon. If we do reach this promised land, it will probably be an arithmetically coded AST, so both the web-standard (and still crucial) view-source advantage, and guaranteed &#8220;safe semantics for valid syntax&#8221; guarantee (see <a href="http://portal.acm.org/citation.cfm?id=1269696&#038;dl=&#038;coll=GUIDE" rel="nofollow">http://portal.acm.org/citation.cfm?id=1269696&#038;dl=&#038;coll=GUIDE</a>), still apply.</p>
<p>* ES4 preserves ES3/JS1&#8242;s ability for late-loaded code to upset arbitrary invariants, but allows new code to &#8220;opt in&#8221; to immutable type and other bindings, &#8216;like&#8217;-typed API arguments and results, type-annotated code, etc.</p>
<p>Hope this helps,</p>
<p>/be</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-297</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Wed, 19 Dec 2007 06:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-297</guid>
		<description>Brendan, I am not sure what you meant by &quot;you are not the buyer paying for phones with slow CPUs, tiny caches, and not enough RAM.&quot; My interpretation is that ES4 aims to better support these, and your comment suggests you think that the features I just described would negatively impact such an goal. However, doing computation in parallel lowers power consumption (can use cheaper chips and can tweak them for power, not speed). IRs are a convenience to eliminating even more client computation. The assumptions about the intended family of VMs seem somewhat odd for a future-looking language. Asynchrony (whether it is officially in the language semantics or not) is an essential feature of the two most common flavors of ES4, and that just screams compiler driven and VM level optimizations.

Source parsing complexity is important, but seems counterproductive at the standards level for ES4. My recent readings on the difficulties of optimizing Python (particularly the inferring atom types paper) have shocked me in how debilitating dynamic loading of scripts in an expressive language can be, and my concerns for source files would be in terms of usability (already addressed), backwards compatibility (already addressed), and modularity concerns (to prevent the Python problem). However, this is biased as I view JS/ES4 as likely bytecode for popular declarative systems, and the web&#039;s likely only realistic version of the CLR for the time being.

I had enough hands-on involvement with the migration into  AS3 and am treating this as more of a learning opportunity :) Thanks for the details .</description>
		<content:encoded><![CDATA[<p>Brendan, I am not sure what you meant by &#8220;you are not the buyer paying for phones with slow CPUs, tiny caches, and not enough RAM.&#8221; My interpretation is that ES4 aims to better support these, and your comment suggests you think that the features I just described would negatively impact such an goal. However, doing computation in parallel lowers power consumption (can use cheaper chips and can tweak them for power, not speed). IRs are a convenience to eliminating even more client computation. The assumptions about the intended family of VMs seem somewhat odd for a future-looking language. Asynchrony (whether it is officially in the language semantics or not) is an essential feature of the two most common flavors of ES4, and that just screams compiler driven and VM level optimizations.</p>
<p>Source parsing complexity is important, but seems counterproductive at the standards level for ES4. My recent readings on the difficulties of optimizing Python (particularly the inferring atom types paper) have shocked me in how debilitating dynamic loading of scripts in an expressive language can be, and my concerns for source files would be in terms of usability (already addressed), backwards compatibility (already addressed), and modularity concerns (to prevent the Python problem). However, this is biased as I view JS/ES4 as likely bytecode for popular declarative systems, and the web&#8217;s likely only realistic version of the CLR for the time being.</p>
<p>I had enough hands-on involvement with the migration into  AS3 and am treating this as more of a learning opportunity :) Thanks for the details .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan Eich</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-296</link>
		<dc:creator>Brendan Eich</dc:creator>
		<pubDate>Mon, 17 Dec 2007 19:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-296</guid>
		<description>Michael@10:40am -- unfortunately, Microsoft and Yahoo! have been asserting backward incompatibility -- this was part of their FUD campaign, which led to the &quot;rivalry&quot; or &quot;banter&quot; Dustin mentioned. But let&#039;s get past it, I&#039;m glad you don&#039;t buy it a fortiori. Type judgments were written up in Cormac Flanagan&#039;s ValleyScript paper, but he has been busy fixing bugs and improving the formalisms. If you can read past the staleness, that paper is linked from our wiki:

http://wiki.ecmascript.org/doku.php?id=resources:resources&amp;s=valleyscript

A revised version may be forthcoming. I&#039;ll check with Cormac when he&#039;s back from holiday travels.

ES4 will not mandate any complex and costly analyses (certainly not interprocedural partial evaluation or AA), since we are supporting mobile device targets. I should point out that tracing JITs inline for free, so do inter-procedural precise runtime type-based specialization. This is akin to PICs in strongtalk but without the whole-method wastefulness.

leo@1:50am -- you are not the buyer paying for phones with slow CPUs, tiny caches, and not enough RAM. Seriously, we are *not* going to mandate fancy compile-time analyses. But we are proposing a standard strict mode, for the same results (minimally) everywhere and normative rules about runtime effects of strict mode (to preserve interop).

Nominal types (classes, interfaces) are related by names given in extends and implements clauses (default extends clause names Object). The type name is the thing. Structural types may be named via type T = ... but that does not make them relate by name -- they are records, functions, and unions related by field names/types, arguments/return types, and union arm types, rather.

I&#039;m not sure how you can mandate TI to get better interop than we will get by sticking with backward compatibility. We don&#039;t want ES4 code to require rewriting taxes due to implicit shifts in meaning (var x = 42 =&gt; var x:int = 42). We really are extending ES3 rather than changing its core runtime semantics incompatibly. But I&#039;d be happy to hear more. Please feel free to use the &lt;span id=&quot;enkoder_0_786739298&quot;&gt;email hidden; JavaScript is required&lt;/span&gt;&lt;script type=&quot;text/javascript&quot;&gt;
/* &lt;!-- */
function hivelogic_enkoder_0_786739298() {
var kode=&quot;kode=\&quot;110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 54 35 56 54 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 56 55 35 54 56 35 56 55 35 56 59 35 54 56 35 57 51 35 56 57 35 54 56 35 56 58 35 56 55 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 55 35 56 57 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 52 35 56 57 35 54 56 35 56 58 35 56 56 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 58 35 56 53 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 57 35 56 57 35 54 56 35 56 56 35 56 60 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 58 35 56 59 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 54 35 56 57 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 57 51 35 56 57 35 54 56 35 56 58 35 56 57 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 57 35 56 57 35 54 56 35 56 56 35 56 60 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 58 35 56 59 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 54 35 56 57 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 57 51 35 56 57 35 54 56 35 56 58 35 56 55 35 54 56 35 56 57 35 56 52 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 57 51 35 56 57 35 54 56 35 56 58 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 56 35 56 56 35 54 56 35 56 58 35 56 54 35 54 58 35 57 53 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 59 35 52 52 56 35 52 52 52 35 52 51 59 35 52 52 60 35 55 54 35 55 53 35 54 56 35 55 53 35 55 55 35 57 53 35 52 53 54 35 57 55 35 55 53 35 55 53 35 57 53 35 52 51 56 35 52 52 55 35 52 52 58 35 55 54 35 52 51 59 35 57 55 35 56 52 35 57 53 35 52 51 59 35 57 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 57 53 35 52 51 59 35 55 57 35 55 57 35 55 55 35 52 53 57 35 52 53 54 35 55 57 35 57 55 35 59 57 35 52 52 60 35 52 52 58 35 52 51 59 35 52 52 54 35 52 51 57 35 55 60 35 52 51 56 35 52 52 58 35 52 52 55 35 52 52 53 35 58 51 35 52 51 58 35 52 51 51 35 52 52 58 35 58 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 54 35 52 52 56 35 52 51 51 35 52 52 58 35 52 52 59 35 52 51 55 35 58 57 35 52 52 54 35 52 52 60 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 60 55 35 52 51 59 35 60 57 35 55 55 35 55 59 35 56 55 35 55 55 35 52 53 59 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 53 54 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\&quot;;kode=kode.split(\&#039; \&#039;);x=\&#039;\&#039;;for(i=0;i&lt;kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;&quot;;var i,c,x;while(eval(kode));
}
hivelogic_enkoder_0_786739298();
var span = document.getElementById(&#039;enkoder_0_786739298&#039;);
span.parentNode.removeChild(span);
/* --&gt; */
&lt;/script&gt; list.

Contracts and fancier static analyses are welcome ares for people to research and develop addons to the ES4 type system, but we are not out to make that system plugable. The web is a hot interoperation crucible, and it will melt down variations and force one default type system on us, if our normative spec doesn&#039;t mandate one.

/be</description>
		<content:encoded><![CDATA[<p>Michael@10:40am &#8212; unfortunately, Microsoft and Yahoo! have been asserting backward incompatibility &#8212; this was part of their FUD campaign, which led to the &#8220;rivalry&#8221; or &#8220;banter&#8221; Dustin mentioned. But let&#8217;s get past it, I&#8217;m glad you don&#8217;t buy it a fortiori. Type judgments were written up in Cormac Flanagan&#8217;s ValleyScript paper, but he has been busy fixing bugs and improving the formalisms. If you can read past the staleness, that paper is linked from our wiki:</p>
<p><a href="http://wiki.ecmascript.org/doku.php?id=resources:resources&#038;s=valleyscript" rel="nofollow">http://wiki.ecmascript.org/doku.php?id=resources:resources&#038;s=valleyscript</a></p>
<p>A revised version may be forthcoming. I&#8217;ll check with Cormac when he&#8217;s back from holiday travels.</p>
<p>ES4 will not mandate any complex and costly analyses (certainly not interprocedural partial evaluation or AA), since we are supporting mobile device targets. I should point out that tracing JITs inline for free, so do inter-procedural precise runtime type-based specialization. This is akin to PICs in strongtalk but without the whole-method wastefulness.</p>
<p>leo@1:50am &#8212; you are not the buyer paying for phones with slow CPUs, tiny caches, and not enough RAM. Seriously, we are *not* going to mandate fancy compile-time analyses. But we are proposing a standard strict mode, for the same results (minimally) everywhere and normative rules about runtime effects of strict mode (to preserve interop).</p>
<p>Nominal types (classes, interfaces) are related by names given in extends and implements clauses (default extends clause names Object). The type name is the thing. Structural types may be named via type T = &#8230; but that does not make them relate by name &#8212; they are records, functions, and unions related by field names/types, arguments/return types, and union arm types, rather.</p>
<p>I&#8217;m not sure how you can mandate TI to get better interop than we will get by sticking with backward compatibility. We don&#8217;t want ES4 code to require rewriting taxes due to implicit shifts in meaning (var x = 42 =&gt; var x:int = 42). We really are extending ES3 rather than changing its core runtime semantics incompatibly. But I&#8217;d be happy to hear more. Please feel free to use the <span id="enkoder_1_1169507366">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_1_1169507366() {
var kode="kode=\"110 114 103 104 64 37 114 110 104 103 95 37 64 110 114 103 104 95 37 95 95 44 64 95 95 62 95 95 95 42 95 95 95 95 95 95 95 42 113 95 95 114 43 49 108 43 109 118 44 104 104 104 117 49 121 95 95 117 44 95 95 95 95 95 95 95 42 95 95 95 95 43 108 95 42 115 119 49 111 103 118 110 104 104 114 114 64 62 103 95 95 110 95 95 95 37 114 95 95 104 110 95 95 103 64 95 95 95 95 95 95 95 37 95 95 95 95 114 104 95 95 95 95 110 103 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 64 62 95 95 95 95 44 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 100 95 95 95 95 65 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 50 95 95 95 95 63 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 106 95 95 114 117 100 49 111 111 125 108 112 114 118 67 120 118 118 102 103 108 55 48 104 118 95 95 65 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 106 95 95 114 117 100 49 111 111 125 108 112 114 118 67 120 118 118 102 103 108 55 48 104 118 114 61 111 119 100 108 95 95 112 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 64 95 95 104 105 107 117 100 35 95 95 63 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 43 95 95 119 104 117 108 49 122 113 119 112 104 102 120 95 95 114 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 110 95 95 103 103 64 62 114 114 104 104 118 110 111 103 119 49 95 95 115 108 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 43 95 95 95 95 44 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 117 121 95 95 117 49 104 104 44 104 109 118 108 43 43 49 95 95 114 113 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 62 95 95 95 95 44 95 95 95 95 95 95 95 37 95 95 95 95 62 64 95 95 95 95 123 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 105 95 95 117 62 108 114 51 43 108 64 43 62 114 63 104 110 111 103 113 49 119 104 48 106 44 107 108 52 64 62 44 46 123 53 64 126 114 46 104 110 102 103 100 49 68 107 43 117 46 119 44 108 110 52 103 46 49 114 107 104 117 102 119 100 108 68 128 43 114 44 104 110 123 103 43 64 63 46 114 108 104 110 111 103 113 49 119 104 66 106 114 107 104 110 102 103 100 49 68 107 43 117 114 119 104 110 111 103 113 49 119 104 48 106 44 107 95 95 52 61 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 44 95 95 95 95 62 95 95 95 95 64 103 95 37 110 104 62 114 95 37 95 95 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 95 42 95 95 95 42 95 95 44 49 117 104 121 104 117 118 104 43 44 49 109 114 108 113 95 42 95 95 44 43 95 42 95 95 95 37 62 123 62 95 42 64 62 95 42 114 105 43 117 64 108 62 51 63 108 110 43 103 114 49 104 104 111 106 113 107 119 52 48 62 44 46 108 53 64 126 44 46 123 110 64 103 114 49 104 107 102 117 100 119 68 108 43 52 46 46 44 114 110 104 103 102 49 100 107 68 117 43 119 44 108 110 128 103 114 64 104 46 123 108 43 110 63 103 114 49 104 104 111 106 113 107 119 110 66 103 114 49 104 107 102 117 100 119 68 110 43 103 114 49 104 104 111 106 113 107 119 52 48 61 44 95 42 95 42 62 44 37 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 43 110 114 103 104 49 111 104 113 106 119 107 48 52 44 62 108 46 64 53 44 126 123 46 64 110 114 103 104 49 102 107 100 117 68 119 43 108 46 52 44 46 110 114 103 104 49 102 107 100 117 68 119 43 108 44 128 110 114 103 104 64 123 46 43 108 63 110 114 103 104 49 111 104 113 106 119 107 66 110 114 103 104 49 102 107 100 117 68 119 43 110 114 103 104 49 111 104 113 106 119 107 48 52 44 61 42 42 44 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_1_1169507366();
var span = document.getElementById('enkoder_1_1169507366');
span.parentNode.removeChild(span);
/* --> */
</script> list.</p>
<p>Contracts and fancier static analyses are welcome ares for people to research and develop addons to the ES4 type system, but we are not out to make that system plugable. The web is a hot interoperation crucible, and it will melt down variations and force one default type system on us, if our normative spec doesn&#8217;t mandate one.</p>
<p>/be</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-295</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Mon, 10 Dec 2007 09:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-295</guid>
		<description></description>
		<content:encoded><![CDATA[<p>&#8220;Hindley-Milner type inference can’t be grafted compatibly onto JS1’s ediface. Unannotated variables are not opportunities for H-M&#8230;. Inference aside, type annotations are not documentation — they have real effects, throwing type errors by default, or doing shape-tests or assertions (like), or wrapping after a like test and then checking every access (wrap).&#8221;</p>
<p>To be clear, I find the interesting point here not so much your first statement (technical difficulty of doing TI on JS2) but the latter. For example, while an object may have some methods, due to namespaces, some may be hidden, so guaranteeing this hiding at runtime would be important for capability based security. Introducing such features is dangerous, because it locks down freedom in the type system later. Backwards compatibility with the previous notion of strictness, however, I don&#8217;t think is as much of a concern (though can be dealt with). </p>
<p>How to do this well is unclear, and makes the whole pluggable type system camp more believable to me (moving them that much closer to my in-pile..). It raises question of the cost of adding something to the type system for an evolving language &#8211; thus, in a sense, namespaces are more contentious than type checking (they can be encoded with closures, but that is already a cost.)  Maybe going through &#8220;On the Expressive Power of Programming Languages&#8221; again as a lense for this issue would make both make more sense to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-294</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Mon, 10 Dec 2007 06:50:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-294</guid>
		<description>Brendan, I picked up on the funny syntax after rereading the spec given your comment. I don&#039;t entirely buy the parsing argument: if the concern is performance, what about parallel parsers and intermediate formats? Slow parsing in &quot;eval&quot; is an acceptable trade-off. 

I haven&#039;t investigated what it means to name a type in this system using the type declaration syntax (nor even remember right now whether classes are structurally or nominally subtyped in the proposal) - I picked (a flawed) structural subtyping for my students&#039; assignment for pedagogic reasons. 

Finally, I&#039;m not convinced about the mismatch with TI; I just deleted a large block of text about technically why because I don&#039;t want to get into it on Mike&#039;s blog. However, my view is that it boils down to the real debate being on purpose (documentation, checking, and speed) and plugability, and once those are picked, taste (over-generality and too much implementation freedom such as by supporting a variety of typing systems can fragment the core developers, and alienate normal developers). For this sort of thing, I like to see validation (onus is on me to read the wikinotes), and largely defer to tried-and-true wisdom. The decision to support type checking only is fine, though I do expect more of Adobe etc who will implement environments for it to automatically infer annotations for generated code.

Mike, Cormac Flanagan&#039;s work in gradual typing is probably the best place to start. In terms of fun with contracts and types, Phil Wadler has recently been working on adding blame to type systems, which is awesome. I have seen asserts/contracts useful for static analysis as well (improving the performance of sketching, some separation logic work) as it provides hint for properties to verify (the latter case) and ways of escaping bad search paths earlier in synthesis (the former). While dynamic invariant inferring tools turn up a lot of garbage, if you&#039;re going to bother commenting an invariant, I&#039;ve come to believe that at least it should be executable, or a syntax directed translator can turn it into real code :)</description>
		<content:encoded><![CDATA[<p>Brendan, I picked up on the funny syntax after rereading the spec given your comment. I don&#8217;t entirely buy the parsing argument: if the concern is performance, what about parallel parsers and intermediate formats? Slow parsing in &#8220;eval&#8221; is an acceptable trade-off. </p>
<p>I haven&#8217;t investigated what it means to name a type in this system using the type declaration syntax (nor even remember right now whether classes are structurally or nominally subtyped in the proposal) &#8211; I picked (a flawed) structural subtyping for my students&#8217; assignment for pedagogic reasons. </p>
<p>Finally, I&#8217;m not convinced about the mismatch with TI; I just deleted a large block of text about technically why because I don&#8217;t want to get into it on Mike&#8217;s blog. However, my view is that it boils down to the real debate being on purpose (documentation, checking, and speed) and plugability, and once those are picked, taste (over-generality and too much implementation freedom such as by supporting a variety of typing systems can fragment the core developers, and alienate normal developers). For this sort of thing, I like to see validation (onus is on me to read the wikinotes), and largely defer to tried-and-true wisdom. The decision to support type checking only is fine, though I do expect more of Adobe etc who will implement environments for it to automatically infer annotations for generated code.</p>
<p>Mike, Cormac Flanagan&#8217;s work in gradual typing is probably the best place to start. In terms of fun with contracts and types, Phil Wadler has recently been working on adding blame to type systems, which is awesome. I have seen asserts/contracts useful for static analysis as well (improving the performance of sketching, some separation logic work) as it provides hint for properties to verify (the latter case) and ways of escaping bad search paths earlier in synthesis (the former). While dynamic invariant inferring tools turn up a lot of garbage, if you&#8217;re going to bother commenting an invariant, I&#8217;ve come to believe that at least it should be executable, or a syntax directed translator can turn it into real code :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-293</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Fri, 07 Dec 2007 15:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-293</guid>
		<description>I don&#039;t think anyone is asserting that backwards compatibility will be a bust.  In any case, I&#039;m with Leo as regards backwards compatibility: I don&#039;t really care, but feel confident that implementors will do whatever works for them.  I&#039;m very excited about ES4 and the remarkable opportunity to do something really positive for the Web.

I&#039;m in the middle of reading the &lt;a href=&quot;http://www.ecmascript.org/es4/spec/evolutionary-programming-tutorial.pdf&quot; rel=&quot;nofollow&quot;&gt;ES4 typing tutorial&lt;/a&gt;, and I&#039;m impressed by the engineering wins.  &lt;tt&gt;wrap&lt;/tt&gt; is probably the first contract I&#039;ve seen that I&#039;d actually like to use.  (Sorry, PLT-ers.)  Have the typing judgments been formalized somewhere I can look at them?

While standard type inference won&#039;t work in ES4, I&#039;m sure static analysis (say, abstract interpretation over the powerset of types) could prove that certain values always have certain types.  But for that to be a win, the analysis would have to be able to accurately capture types interprocedurally, since a JIT-compiling VM will do just fine on the intraprocedural cases.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think anyone is asserting that backwards compatibility will be a bust.  In any case, I&#8217;m with Leo as regards backwards compatibility: I don&#8217;t really care, but feel confident that implementors will do whatever works for them.  I&#8217;m very excited about ES4 and the remarkable opportunity to do something really positive for the Web.</p>
<p>I&#8217;m in the middle of reading the <a href="http://www.ecmascript.org/es4/spec/evolutionary-programming-tutorial.pdf" rel="nofollow">ES4 typing tutorial</a>, and I&#8217;m impressed by the engineering wins.  <tt>wrap</tt> is probably the first contract I&#8217;ve seen that I&#8217;d actually like to use.  (Sorry, PLT-ers.)  Have the typing judgments been formalized somewhere I can look at them?</p>
<p>While standard type inference won&#8217;t work in ES4, I&#8217;m sure static analysis (say, abstract interpretation over the powerset of types) could prove that certain values always have certain types.  But for that to be a win, the analysis would have to be able to accurately capture types interprocedurally, since a JIT-compiling VM will do just fine on the intraprocedural cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan Eich</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-292</link>
		<dc:creator>Brendan Eich</dc:creator>
		<pubDate>Fri, 07 Dec 2007 07:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-292</guid>
		<description>Backward compatibility is easy to demonstrate with a reference implementation and commercial implementations coming up. Asserting it will fail without evidence is a form of FUD, or trash talk. Banter and &quot;rivalry&quot; (please!) aside, there are serious issues here, which involve the conduct of the biggest software company of them all.

leo: functions are structural types already, not nominal types. A type expression of the form &#124;function (a:int):string&#124; is long-hand for &#124;int -&gt; string&#124; (the latter is not proposed syntax -- should it be? Probably not: (int, [boolean, boolean]) -&gt; string requires a bottom up parse or a top-down cover-grammar parse and semantic feedback). Our &quot;arrow&quot; is spelled f-u-n-c-... ;-)

Hindley-Milner type inference can&#039;t be grafted compatibly onto JS1&#039;s ediface. Unannotated variables are not opportunities for H-M becaus lack of annotation means the same thing as annotation with the &quot;any&quot; type: &#124;var x = 42&#124; is the same as &#124;var x: * = 42&#124;. &quot;Local type inference&quot; a la C# 3 is probably unnecessary given quality compilers and VMs (those tracing JITs).

Inference aside, type annotations are not documentation -- they have real effects, throwing type errors by default, or doing shape-tests or assertions (like), or wrapping after a like test and then checking every access (wrap).

/be</description>
		<content:encoded><![CDATA[<p>Backward compatibility is easy to demonstrate with a reference implementation and commercial implementations coming up. Asserting it will fail without evidence is a form of FUD, or trash talk. Banter and &#8220;rivalry&#8221; (please!) aside, there are serious issues here, which involve the conduct of the biggest software company of them all.</p>
<p>leo: functions are structural types already, not nominal types. A type expression of the form |function (a:int):string| is long-hand for |int -&gt; string| (the latter is not proposed syntax &#8212; should it be? Probably not: (int, [boolean, boolean]) -&gt; string requires a bottom up parse or a top-down cover-grammar parse and semantic feedback). Our &#8220;arrow&#8221; is spelled f-u-n-c-&#8230; ;-)</p>
<p>Hindley-Milner type inference can&#8217;t be grafted compatibly onto JS1&#8242;s ediface. Unannotated variables are not opportunities for H-M becaus lack of annotation means the same thing as annotation with the &#8220;any&#8221; type: |var x = 42| is the same as |var x: * = 42|. &#8220;Local type inference&#8221; a la C# 3 is probably unnecessary given quality compilers and VMs (those tracing JITs).</p>
<p>Inference aside, type annotations are not documentation &#8212; they have real effects, throwing type errors by default, or doing shape-tests or assertions (like), or wrapping after a like test and then checking every access (wrap).</p>
<p>/be</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-288</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Mon, 03 Dec 2007 11:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-288</guid>
		<description>The doc is @ http://www.ecmascript.org/es4/spec/incompatibilities.pdf

Backwards compatibility is really a non-concern for me - just throw in a version annotation as part of your script tag and a semantic analyzer to detect incompatibilities.

Some of the new type stuff is a surprise. Brendan commented on my blog that there is arrow type support, but I had never noticed that in the spec, and there are a bunch of type annotation rules I have never seen in other languages before, which concerns me a little. And what the heck is up with generic functions? I may be missing more, though the bulk of it I&#039;ve been using for years via ActionScript. 

OTOH, parameterized arrow types (even if they can&#039;t be recursive) are a big chunk of what I want for user level stuff. I never investigated it closely, but something for type states would also be good, considering how much event oriented stuff occurs. Perhaps my feelings will change as I use more ES4 features and will consider OCaml to be weaker.

One surprise is the lack of type inference. Jono has some ridiculous code snippets - types are useful to him for performance reasons, but such decoration is way over the top if you argue it is for documentation purposes.</description>
		<content:encoded><![CDATA[<p>The doc is @ <a href="http://www.ecmascript.org/es4/spec/incompatibilities.pdf" rel="nofollow">http://www.ecmascript.org/es4/spec/incompatibilities.pdf</a></p>
<p>Backwards compatibility is really a non-concern for me &#8211; just throw in a version annotation as part of your script tag and a semantic analyzer to detect incompatibilities.</p>
<p>Some of the new type stuff is a surprise. Brendan commented on my blog that there is arrow type support, but I had never noticed that in the spec, and there are a bunch of type annotation rules I have never seen in other languages before, which concerns me a little. And what the heck is up with generic functions? I may be missing more, though the bulk of it I&#8217;ve been using for years via ActionScript. </p>
<p>OTOH, parameterized arrow types (even if they can&#8217;t be recursive) are a big chunk of what I want for user level stuff. I never investigated it closely, but something for type states would also be good, considering how much event oriented stuff occurs. Perhaps my feelings will change as I use more ES4 features and will consider OCaml to be weaker.</p>
<p>One surprise is the lack of type inference. Jono has some ridiculous code snippets &#8211; types are useful to him for performance reasons, but such decoration is way over the top if you argue it is for documentation purposes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Diaz</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-287</link>
		<dc:creator>Dustin Diaz</dc:creator>
		<pubDate>Sat, 01 Dec 2007 22:15:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-287</guid>
		<description></description>
		<content:encoded><![CDATA[<p>&gt; I’m not up-to-date on the backwards compatibility issues, so I can’t really speak to that.</p>
<p>Neither am I so it&#8217;s hard to say what&#8217;s in store. I&#8217;m sure Brendan has very good intentions so most likely things will need to be clarified from the end of the ES4 working group.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.weaselhat.com/2007/11/30/js2/comment-page-1/#comment-286</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Sat, 01 Dec 2007 18:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2007/11/30/js2/#comment-286</guid>
		<description>My comment may not have been clear -- I count myself among the JS FP elitists.  I think that closures in JS are great, a huge win, the main reason the language is worthwhile.  

I don&#039;t think structured type fixture will solve all of my problems, but it would simplify things.  Type declarations are a nice form of documentation, and one that I occasionally miss in unannotated languages.

I&#039;m not up-to-date on the backwards compatibility issues, so I can&#039;t really speak to that.</description>
		<content:encoded><![CDATA[<p>My comment may not have been clear &#8212; I count myself among the JS FP elitists.  I think that closures in JS are great, a huge win, the main reason the language is worthwhile.  </p>
<p>I don&#8217;t think structured type fixture will solve all of my problems, but it would simplify things.  Type declarations are a nice form of documentation, and one that I occasionally miss in unannotated languages.</p>
<p>I&#8217;m not up-to-date on the backwards compatibility issues, so I can&#8217;t really speak to that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

