<?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: Listen to me rant about ActionScript, part 3</title>
	<atom:link href="http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/</link>
	<description>References and declarations in Flex compiler  development</description>
	<lastBuildDate>Thu, 20 Jan 2011 23:53:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: AJ</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-30028</link>
		<dc:creator>AJ</dc:creator>
		<pubDate>Sat, 21 Mar 2009 14:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-30028</guid>
		<description>hoisted by your own petard? :)</description>
		<content:encoded><![CDATA[<p>hoisted by your own petard? <img src='http://www.markingoccurrences.com/adobe/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FlashApe &#187; Blog Archive &#187; Burned by hoisting</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-29952</link>
		<dc:creator>FlashApe &#187; Blog Archive &#187; Burned by hoisting</dc:creator>
		<pubDate>Thu, 19 Mar 2009 07:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-29952</guid>
		<description>[...] pm  A while back I read a post about variable hoisting in Actionscript , and remember thinking how it was weird how that was the first time I&#039;d ever heard about that, and [...]</description>
		<content:encoded><![CDATA[<p>[...] pm  A while back I read a post about variable hoisting in Actionscript , and remember thinking how it was weird how that was the first time I&#8217;d ever heard about that, and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh McDonald</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28303</link>
		<dc:creator>Josh McDonald</dc:creator>
		<pubDate>Wed, 28 Jan 2009 12:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28303</guid>
		<description>It&#039;s from Lisp, via scheme, self, javascript, and ECMAScript. Unfortunately we lost &quot;let&quot; along the way.</description>
		<content:encoded><![CDATA[<p>It&#8217;s from Lisp, via scheme, self, javascript, and ECMAScript. Unfortunately we lost &#8220;let&#8221; along the way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wonderwhy-er</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28251</link>
		<dc:creator>wonderwhy-er</dc:creator>
		<pubDate>Tue, 27 Jan 2009 11:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28251</guid>
		<description>Just decided to comment that I like your posts on the meter. As programmer with knowledge of .Net and Java I often find AS3 little bit troubling...

So keep them coming may be then more people will pay attention to those and Adobe eventually will pay attention too. 

There are few other problems that bug me from time to time... Biggest I think is Event model flaws. No event model is way better then AS2 and way closer to proper event models but EventDispatcher seriously lacks methods like getEventListenersNum, getEventListenerAt, removeEventListenerAt, ClearEventListeners... I think I can write my own EventDispatcher class that will include those but that will not solve problems I am having sometimes for all classes that inherit original EventDispatcher :( 

And those include such cases like having memory leaks because of strong linked event listeners and that some objects don&#039;t have links to them in your program anymore but stay somewhere there and still catching events and eating processor time and memory... 

Or other problem is that EventDispatcher does not check for duplicates or something and I need to make my own flags in objects and track their state to see if some kind of events listeners already registered or not...

And yet another big lack is operator overloading :( I stumble on need for it pretty often and may be it is not &quot;must&quot; thing but in combo with no proper code hints in some editors it becomes a true hell :( Also making static class member functions to simulate constructor overloading is messy sometiems too :(</description>
		<content:encoded><![CDATA[<p>Just decided to comment that I like your posts on the meter. As programmer with knowledge of .Net and Java I often find AS3 little bit troubling&#8230;</p>
<p>So keep them coming may be then more people will pay attention to those and Adobe eventually will pay attention too. </p>
<p>There are few other problems that bug me from time to time&#8230; Biggest I think is Event model flaws. No event model is way better then AS2 and way closer to proper event models but EventDispatcher seriously lacks methods like getEventListenersNum, getEventListenerAt, removeEventListenerAt, ClearEventListeners&#8230; I think I can write my own EventDispatcher class that will include those but that will not solve problems I am having sometimes for all classes that inherit original EventDispatcher <img src='http://www.markingoccurrences.com/adobe/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  </p>
<p>And those include such cases like having memory leaks because of strong linked event listeners and that some objects don&#8217;t have links to them in your program anymore but stay somewhere there and still catching events and eating processor time and memory&#8230; </p>
<p>Or other problem is that EventDispatcher does not check for duplicates or something and I need to make my own flags in objects and track their state to see if some kind of events listeners already registered or not&#8230;</p>
<p>And yet another big lack is operator overloading <img src='http://www.markingoccurrences.com/adobe/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I stumble on need for it pretty often and may be it is not &#8220;must&#8221; thing but in combo with no proper code hints in some editors it becomes a true hell <img src='http://www.markingoccurrences.com/adobe/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Also making static class member functions to simulate constructor overloading is messy sometiems too <img src='http://www.markingoccurrences.com/adobe/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Zuckerman</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28234</link>
		<dc:creator>David Zuckerman</dc:creator>
		<pubDate>Mon, 26 Jan 2009 21:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28234</guid>
		<description>Hey Sho, nice to hear from you!

And you&#039;re right, hoisting was introduced by the ECMAScript group for compatibility.  And before the ES4 split, it was a huge priority for Adobe and AS3 to stay as language compliant as possible.  Not sure if you&#039;ve followed the Harmony proposal from the ECMAScript group, but it&#039;s a far cry from ES4 and the current incarnation of ActionScript.  Really, they look almost nothing alike and the chances of us being compatible look slim right now.

I can&#039;t speak on the future of AS3 because really, I don&#039;t know where it&#039;s going and I&#039;m not sure Adobe does either.  But at this point, I&#039;d like to see us break from ECMAScript.  All languages have their problems, but AS3 seems to have complexity issues inherited from  ECMAScript that don&#039;t help the people using the language.  To name a few, the lack of abstract classes and private constructors has led to countless complaints. And the addition structures like namespaces have just led to confusion.

Regardless of what happens, the future will be interesting.</description>
		<content:encoded><![CDATA[<p>Hey Sho, nice to hear from you!</p>
<p>And you&#8217;re right, hoisting was introduced by the ECMAScript group for compatibility.  And before the ES4 split, it was a huge priority for Adobe and AS3 to stay as language compliant as possible.  Not sure if you&#8217;ve followed the Harmony proposal from the ECMAScript group, but it&#8217;s a far cry from ES4 and the current incarnation of ActionScript.  Really, they look almost nothing alike and the chances of us being compatible look slim right now.</p>
<p>I can&#8217;t speak on the future of AS3 because really, I don&#8217;t know where it&#8217;s going and I&#8217;m not sure Adobe does either.  But at this point, I&#8217;d like to see us break from ECMAScript.  All languages have their problems, but AS3 seems to have complexity issues inherited from  ECMAScript that don&#8217;t help the people using the language.  To name a few, the lack of abstract classes and private constructors has led to countless complaints. And the addition structures like namespaces have just led to confusion.</p>
<p>Regardless of what happens, the future will be interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28233</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Mon, 26 Jan 2009 21:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28233</guid>
		<description>Hey there. Stumbled on your blog while randomly surfing the web.

I believe AS3 hoists variables to be compatible with ECMAScript, and ECMAScript hoists variables to be compatible with JavaScript 1.5. When I was at Adobe, getting 100% ECMA compliance was a major goal. Not sure if things have changed since I left.

As for the language construct, I am not sure exactly how variable hoisting got introduced in JS1.5, but my guess is that ease of implementation was the big reason there. The ES4 discussion lists seem to indicate that most people there don&#039;t like the hoisting behavior.

For my money, the Flex compiler should probably retain the behavior in the compiler, but warn about referencing hoisted variables before they are declared. As for FB behavior, I agree with your assessment that no one does this on purpose so there&#039;s no need to support it.

Hope all is well w/you.</description>
		<content:encoded><![CDATA[<p>Hey there. Stumbled on your blog while randomly surfing the web.</p>
<p>I believe AS3 hoists variables to be compatible with ECMAScript, and ECMAScript hoists variables to be compatible with JavaScript 1.5. When I was at Adobe, getting 100% ECMA compliance was a major goal. Not sure if things have changed since I left.</p>
<p>As for the language construct, I am not sure exactly how variable hoisting got introduced in JS1.5, but my guess is that ease of implementation was the big reason there. The ES4 discussion lists seem to indicate that most people there don&#8217;t like the hoisting behavior.</p>
<p>For my money, the Flex compiler should probably retain the behavior in the compiler, but warn about referencing hoisted variables before they are declared. As for FB behavior, I agree with your assessment that no one does this on purpose so there&#8217;s no need to support it.</p>
<p>Hope all is well w/you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Zuckerman</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28232</link>
		<dc:creator>David Zuckerman</dc:creator>
		<pubDate>Mon, 26 Jan 2009 21:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28232</guid>
		<description>Hi George-

Flex Builder should issue a warning, but it&#039;s part of the language so it&#039;s a fine line.  The Flex compiler currently doesn&#039;t track this as an error (even though I think it should), and the compiler is what we use to issue warnings to the user.    

You should file a bug with us to get it on our radar.
http://bugs.adobe.com/flex
-David</description>
		<content:encoded><![CDATA[<p>Hi George-</p>
<p>Flex Builder should issue a warning, but it&#8217;s part of the language so it&#8217;s a fine line.  The Flex compiler currently doesn&#8217;t track this as an error (even though I think it should), and the compiler is what we use to issue warnings to the user.    </p>
<p>You should file a bug with us to get it on our radar.<br />
<a href="http://bugs.adobe.com/flex" rel="nofollow">http://bugs.adobe.com/flex</a><br />
-David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Zuckerman</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28231</link>
		<dc:creator>David Zuckerman</dc:creator>
		<pubDate>Mon, 26 Jan 2009 21:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28231</guid>
		<description>Hey Matt-

I just updated the code to initialize myFlag to false before it&#039;s declared.  And it will compile just fine, and in my tests it will print &quot;null What am I?&quot;

Thanks for the catch!
-David</description>
		<content:encoded><![CDATA[<p>Hey Matt-</p>
<p>I just updated the code to initialize myFlag to false before it&#8217;s declared.  And it will compile just fine, and in my tests it will print &#8220;null What am I?&#8221;</p>
<p>Thanks for the catch!<br />
-David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28230</link>
		<dc:creator>George</dc:creator>
		<pubDate>Mon, 26 Jan 2009 20:59:47 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28230</guid>
		<description>I have been burned by this many times and the fact that FlexBuilder does nothing about it is disappointing to say the least.  While this situation does not normally arise by design it can arise quite frequently by accident when editing large code blocks (e.g. cut and paste code from bottom of a block to top of the block above the variable decl.).

IMHO, FlexBuilder should at minimum issue a warning when this occurs as it is most likely a coding mistake, and have the option of forcing an error during compilation to require correction.</description>
		<content:encoded><![CDATA[<p>I have been burned by this many times and the fact that FlexBuilder does nothing about it is disappointing to say the least.  While this situation does not normally arise by design it can arise quite frequently by accident when editing large code blocks (e.g. cut and paste code from bottom of a block to top of the block above the variable decl.).</p>
<p>IMHO, FlexBuilder should at minimum issue a warning when this occurs as it is most likely a coding mistake, and have the option of forcing an error during compilation to require correction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.markingoccurrences.com/adobe/2009/01/26/listen-to-be-rant-about-actionscript-part-3/comment-page-1/#comment-28226</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Mon, 26 Jan 2009 20:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://davidzuckerman.com/adobe/?p=116#comment-28226</guid>
		<description>compile this as see for yourself, its never true

function myASFunction():void {
     trace(&#039;myFlag = &#039; + myFlag); // is false
	 if(myFlag) { //defined way below from a different scope
          myMessage += &quot;What am I?&quot;;
          trace(myMessage); //will print What am I? // no it wont
     }
     var myFlag:Boolean;
	 trace(&#039;myFlag = &#039; + myFlag); // is false
     var myMessage:String = &quot;WTF?&quot;;
	 trace(&#039;myMessage = &#039; + myMessage); // will print &#039;myMessage&#039;;
} 
myASFunction();</description>
		<content:encoded><![CDATA[<p>compile this as see for yourself, its never true</p>
<p>function myASFunction():void {<br />
     trace(&#8216;myFlag = &#8216; + myFlag); // is false<br />
	 if(myFlag) { //defined way below from a different scope<br />
          myMessage += &#8220;What am I?&#8221;;<br />
          trace(myMessage); //will print What am I? // no it wont<br />
     }<br />
     var myFlag:Boolean;<br />
	 trace(&#8216;myFlag = &#8216; + myFlag); // is false<br />
     var myMessage:String = &#8220;WTF?&#8221;;<br />
	 trace(&#8216;myMessage = &#8216; + myMessage); // will print &#8216;myMessage&#8217;;<br />
}<br />
myASFunction();</p>
]]></content:encoded>
	</item>
</channel>
</rss>

