<?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: Comparing the syntax of Java 5 and ActionScript 3</title>
	<atom:link href="http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/feed" rel="self" type="application/rss+xml" />
	<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3</link>
	<description>A blog about our experience with Adobe Flex</description>
	<lastBuildDate>Wed, 10 Mar 2010 17:11:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: EECOLOR</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-1103</link>
		<dc:creator>EECOLOR</dc:creator>
		<pubDate>Wed, 20 Dec 2006 20:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-1103</guid>
		<description>The switch statements in AS3 can handle every type of comparisson. You can even put instances of objects as cases.

Greetz Erik</description>
		<content:encoded><![CDATA[<p>The switch statements in AS3 can handle every type of comparisson. You can even put instances of objects as cases.</p>
<p>Greetz Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Grapp</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-859</link>
		<dc:creator>Igor Grapp</dc:creator>
		<pubDate>Mon, 04 Dec 2006 18:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-859</guid>
		<description>I would also add another item to the lis -  AS3 has ability to use String objects as a &quot;case&quot; labels in switch statment.
For example:

var selector:String = &quot;ALPHA&quot;;

switch ( selector ) {
   case &quot;ALPHA&quot;:
      trace(&quot;alpha&quot;);break;
   
   case &quot;BETA&quot;:
      trace(&quot;beta&quot;);break;

}

Java code could look like this:

enum CASES { ALPHA, BETA }
public class Test {
    public static void main(String args[]) {
        CASES selector = CASES.ALPHA;
        switch ( selector ) {
           case ALPHA: System.out.println(&quot;alpha&quot;); break;
	   case BETA:  System.out.println(&quot;beta&quot;); break;
	}
    }
}</description>
		<content:encoded><![CDATA[<p>I would also add another item to the lis &#8211;  AS3 has ability to use String objects as a &#8220;case&#8221; labels in switch statment.<br />
For example:</p>
<p>var selector:String = &#8220;ALPHA&#8221;;</p>
<p>switch ( selector ) {<br />
   case &#8220;ALPHA&#8221;:<br />
      trace(&#8220;alpha&#8221;);break;</p>
<p>   case &#8220;BETA&#8221;:<br />
      trace(&#8220;beta&#8221;);break;</p>
<p>}</p>
<p>Java code could look like this:</p>
<p>enum CASES { ALPHA, BETA }<br />
public class Test {<br />
    public static void main(String args[]) {<br />
        CASES selector = CASES.ALPHA;<br />
        switch ( selector ) {<br />
           case ALPHA: System.out.println(&#8220;alpha&#8221;); break;<br />
	   case BETA:  System.out.println(&#8220;beta&#8221;); break;<br />
	}<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EECOLOR</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-832</link>
		<dc:creator>EECOLOR</dc:creator>
		<pubDate>Thu, 30 Nov 2006 18:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-832</guid>
		<description>&quot;Unordered key-value pairs&quot; You compare them with Array&#039;s in Actionscript, i would however recommend you compare them with Objects. If you use Array&#039;s as key-value holders, you can not use any of the Array&#039;s functions and thus have bagage that is unneeded. 

You write: var car:Object = {make:”Toyota”, model:”Camry”}; as an alternative syntax, this is however the &#039;shortcut&#039; for Object as [] is for Array&#039;s, / / for regexps etc.

Very nice article though :) Thnx for making it :)


Greetz Erik</description>
		<content:encoded><![CDATA[<p>&#8220;Unordered key-value pairs&#8221; You compare them with Array&#8217;s in Actionscript, i would however recommend you compare them with Objects. If you use Array&#8217;s as key-value holders, you can not use any of the Array&#8217;s functions and thus have bagage that is unneeded. </p>
<p>You write: var car:Object = {make:”Toyota”, model:”Camry”}; as an alternative syntax, this is however the &#8217;shortcut&#8217; for Object as [] is for Array&#8217;s, / / for regexps etc.</p>
<p>Very nice article though <img src='http://flexblog.faratasystems.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thnx for making it <img src='http://flexblog.faratasystems.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Greetz Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-760</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Tue, 21 Nov 2006 01:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-760</guid>
		<description>[quote]Paulius,

You are mistaken. Try this code:

for (var i:int=0;i</description>
		<content:encoded><![CDATA[<p>[quote]Paulius,</p>
<p>You are mistaken. Try this code:</p>
<p>for (var i:int=0;i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: judah</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-725</link>
		<dc:creator>judah</dc:creator>
		<pubDate>Fri, 17 Nov 2006 07:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-725</guid>
		<description>Thank you for this excellent resource. Now I can start flame wars with my Java friends. JK

I understood all comparisons but I would love a little more clarity on namespace feature in AS3. Would this mean you can include a namespace (what is this?) and then use only the function you need in the build operation (thus saving space in the swf)? 

use namespace abc ;
abc::myCalc(){}</description>
		<content:encoded><![CDATA[<p>Thank you for this excellent resource. Now I can start flame wars with my Java friends. JK</p>
<p>I understood all comparisons but I would love a little more clarity on namespace feature in AS3. Would this mean you can include a namespace (what is this?) and then use only the function you need in the build operation (thus saving space in the swf)? </p>
<p>use namespace abc ;<br />
abc::myCalc(){}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yakov Fain</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-714</link>
		<dc:creator>Yakov Fain</dc:creator>
		<pubDate>Tue, 14 Nov 2006 03:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-714</guid>
		<description>Thanks, Mike - the quotes were missing.</description>
		<content:encoded><![CDATA[<p>Thanks, Mike &#8211; the quotes were missing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Morearty</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-713</link>
		<dc:creator>Mike Morearty</dc:creator>
		<pubDate>Tue, 14 Nov 2006 01:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-713</guid>
		<description>Typo in &quot;Unordered key-value pairs&quot; -- In the AS3 column, it says this friends[good]=”Mary” and so on, but I think what you intended was friends[&quot;good&quot;]=&quot;Mary&quot;.</description>
		<content:encoded><![CDATA[<p>Typo in &#8220;Unordered key-value pairs&#8221; &#8212; In the AS3 column, it says this friends[good]=”Mary” and so on, but I think what you intended was friends["good"]=&#8221;Mary&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-711</link>
		<dc:creator>Noel</dc:creator>
		<pubDate>Mon, 13 Nov 2006 16:06:28 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-711</guid>
		<description>Thanks, this is a great comparison.

You might also consider adding the AS3 &quot;Dictionary&quot; class to the row labeled: &quot;Unordered key-value pairs&quot;</description>
		<content:encoded><![CDATA[<p>Thanks, this is a great comparison.</p>
<p>You might also consider adding the AS3 &#8220;Dictionary&#8221; class to the row labeled: &#8220;Unordered key-value pairs&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Rühl</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-709</link>
		<dc:creator>Thomas Rühl</dc:creator>
		<pubDate>Mon, 13 Nov 2006 11:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-709</guid>
		<description>There&#039;s a mistake for actionscript&#039;s strict equality. It has to be &#039;===&#039; rather than &#039;==&#039;.

Cheers, Thomas.</description>
		<content:encoded><![CDATA[<p>There&#8217;s a mistake for actionscript&#8217;s strict equality. It has to be &#8216;===&#8217; rather than &#8216;==&#8217;.</p>
<p>Cheers, Thomas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-708</link>
		<dc:creator>J</dc:creator>
		<pubDate>Mon, 13 Nov 2006 10:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-708</guid>
		<description>Thanks, Yakov. Very useful article for beginner</description>
		<content:encoded><![CDATA[<p>Thanks, Yakov. Very useful article for beginner</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yakov</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-707</link>
		<dc:creator>Yakov</dc:creator>
		<pubDate>Mon, 13 Nov 2006 10:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-707</guid>
		<description>Thanks, Phil. 
This was an extra line (copy/paste error) in the AS3 column. Fixed</description>
		<content:encoded><![CDATA[<p>Thanks, Phil.<br />
This was an extra line (copy/paste error) in the AS3 column. Fixed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Douglas</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-705</link>
		<dc:creator>Phil Douglas</dc:creator>
		<pubDate>Mon, 13 Nov 2006 05:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-705</guid>
		<description>Is this upcasting for AS3 correct?

Abc myObj = new Xyz();

It looks like a copy of the java.</description>
		<content:encoded><![CDATA[<p>Is this upcasting for AS3 correct?</p>
<p>Abc myObj = new Xyz();</p>
<p>It looks like a copy of the java.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yakov</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-704</link>
		<dc:creator>Yakov</dc:creator>
		<pubDate>Sun, 12 Nov 2006 23:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-704</guid>
		<description>Paulius,

You are mistaken. Try this code:

for (var i:int=0;i&lt;10;i++){
trace(&quot;i=&quot;+i);
}
trace (&quot;i====&quot;+i);

It prints i====10</description>
		<content:encoded><![CDATA[<p>Paulius,</p>
<p>You are mistaken. Try this code:</p>
<p>for (var i:int=0;i&lt;10;i++){<br />
trace(&#8220;i=&#8221;+i);<br />
}<br />
trace (&#8220;i====&#8221;+i);</p>
<p>It prints i====10</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paulius</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-703</link>
		<dc:creator>Paulius</dc:creator>
		<pubDate>Sun, 12 Nov 2006 22:40:26 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-703</guid>
		<description>There are block variables in AS3 - for (var x in y) { x is a variable visible only in this block of code }</description>
		<content:encoded><![CDATA[<p>There are block variables in AS3 &#8211; for (var x in y) { x is a variable visible only in this block of code }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yakov</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-702</link>
		<dc:creator>Yakov</dc:creator>
		<pubDate>Sun, 12 Nov 2006 20:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-702</guid>
		<description>Alessandro,

There is no method overloading in AS3. There&#039;s a workaround described &lt;a href=&quot;http://flexblog.faratasystems.com/?p=100&quot; rel=&quot;nofollow&quot;&gt;over here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Alessandro,</p>
<p>There is no method overloading in AS3. There&#8217;s a workaround described <a href="http://flexblog.faratasystems.com/?p=100" rel="nofollow">over here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Lapasa</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-701</link>
		<dc:creator>Mark Lapasa</dc:creator>
		<pubDate>Sun, 12 Nov 2006 19:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-701</guid>
		<description>Very nice. A couple of weeks ago I thought of doing something similar to help aid me in my study of Java.

In regards to Arrays in AS3, I believe you can declare a reference to an array but you are not restricted to 

a) defining the size of the array and 
b) specifying the exclusive data type it must store

before you can start using the object. The array will automatically resize when adding and removing elements. If anything, AS3&#039;s arrays behave more like J2SE5&#039;s ArrayList.

I don&#039;t know if this is worth mentioning but Arrays in AS3 can also be typed if desired (i.e. pseudo-Generics).
http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=98</description>
		<content:encoded><![CDATA[<p>Very nice. A couple of weeks ago I thought of doing something similar to help aid me in my study of Java.</p>
<p>In regards to Arrays in AS3, I believe you can declare a reference to an array but you are not restricted to </p>
<p>a) defining the size of the array and<br />
b) specifying the exclusive data type it must store</p>
<p>before you can start using the object. The array will automatically resize when adding and removing elements. If anything, AS3&#8217;s arrays behave more like J2SE5&#8217;s ArrayList.</p>
<p>I don&#8217;t know if this is worth mentioning but Arrays in AS3 can also be typed if desired (i.e. pseudo-Generics).<br />
<a href="http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=98" rel="nofollow">http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=98</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alessandro Crugnola</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-700</link>
		<dc:creator>Alessandro Crugnola</dc:creator>
		<pubDate>Sun, 12 Nov 2006 18:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-700</guid>
		<description>Isn&#039;t there method overloading in Java?
That&#039;s one of the great missing in as for me...</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t there method overloading in Java?<br />
That&#8217;s one of the great missing in as for me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yakov</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-699</link>
		<dc:creator>Yakov</dc:creator>
		<pubDate>Sun, 12 Nov 2006 18:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-699</guid>
		<description>Michael,

Sure, you can use it. Just  put a reference to this blog there.

All the best,
Yakov</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>Sure, you can use it. Just  put a reference to this blog there.</p>
<p>All the best,<br />
Yakov</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Klishin</title>
		<link>http://flexblog.faratasystems.com/2006/11/12/comparing-the-syntax-of-java-5-and-actionscript-3/comment-page-1#comment-697</link>
		<dc:creator>Michael Klishin</dc:creator>
		<pubDate>Sun, 12 Nov 2006 18:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://flexblog.faratasystems.com/?p=115#comment-697</guid>
		<description>Yakov,

Thanks for this nice comparison. I monitor russian Flex community wiki at flexwiki.novemberain.com. May I use this table there?
Thanks!</description>
		<content:encoded><![CDATA[<p>Yakov,</p>
<p>Thanks for this nice comparison. I monitor russian Flex community wiki at flexwiki.novemberain.com. May I use this table there?<br />
Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
