<?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: Update: Avoid ints in ActionScript</title>
	<atom:link href="http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/</link>
	<description>music, technology, interfaces, people</description>
	<lastBuildDate>Tue, 03 Aug 2010 22:16:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Brian Lai</title>
		<link>http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/comment-page-1/#comment-13034</link>
		<dc:creator>Brian Lai</dc:creator>
		<pubDate>Sat, 24 Feb 2007 01:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/#comment-13034</guid>
		<description>After all, this is part of the ECMAScript specification. For me, I always see AS Array as a HashMap.</description>
		<content:encoded><![CDATA[<p>After all, this is part of the ECMAScript specification. For me, I always see AS Array as a HashMap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radek</title>
		<link>http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/comment-page-1/#comment-2157</link>
		<dc:creator>Radek</dc:creator>
		<pubDate>Wed, 21 Jun 2006 23:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/#comment-2157</guid>
		<description>Hi,

I can completly agree with Ray. I don&#039;t see any reason why to treat array as an object &quot;sometimes&quot;. If language defines native type Array it should be always array.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I can completly agree with Ray. I don&#8217;t see any reason why to treat array as an object &#8220;sometimes&#8221;. If language defines native type Array it should be always array.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Schmalle</title>
		<link>http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/comment-page-1/#comment-2153</link>
		<dc:creator>Michael Schmalle</dc:creator>
		<pubDate>Mon, 19 Jun 2006 19:43:48 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/#comment-2153</guid>
		<description>Hi,

If I remember correctly, this is due to array accessing on an object. 

It&#039;s like an array &#039;really&#039; isn&#039;t an array like you would think becasue of the way AS language works.

I am no engineer but I really remember this being brought up by Gordon Smith of Adobe.

There is some reason for this, I just can&#039;t think of it.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>If I remember correctly, this is due to array accessing on an object. </p>
<p>It&#8217;s like an array &#8216;really&#8217; isn&#8217;t an array like you would think becasue of the way AS language works.</p>
<p>I am no engineer but I really remember this being brought up by Gordon Smith of Adobe.</p>
<p>There is some reason for this, I just can&#8217;t think of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Greenwell</title>
		<link>http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/comment-page-1/#comment-2152</link>
		<dc:creator>Ray Greenwell</dc:creator>
		<pubDate>Mon, 19 Jun 2006 19:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2006/06/15/update-avoid-ints-in-actionscript/#comment-2152</guid>
		<description>Sho,

This comment isn&#039;t about the performance of the different number types, but about the way they behave.

As I reported a while back, there seems to be no concept of integer math, which is very strange for someone coming from a C/Java background:

  var xx :int = 3;
  var yy :int = 2;
  someArray[xx/yy] = &quot;MyStringValue&quot;;

Rather than storing the value at array element 1, the Array is now broken and has a value stored under the property name &quot;1.5&quot;.

Another thing I discovered recently is that you can&#039;t depend on the type of a number, because it can change out from under you:

  var nn :Number = 1.2;
  trace(&quot;nn is &quot; + getQualifiedClassName(nn)); // outputs &quot;nn is Number&quot;
  nn += 1.8;
  trace(&quot;nn is &quot; + getQualifiedClassName(nn)); // outputs &quot;nn is int&quot;

This is very disturbing, because I would like to write code that serializes objects to send to a server, and metadata is not sent. The format of the binary data is well-known for each service request to the server, but on the client I would like the actual serialization code to be dumb and just examine the objects passed to it and send them along. However, I cannot depend on a Number looking like a Number so that I know to use my IDataOutput&#039;s writeDouble method instead of the writeInt method.

It would be great if this were fixed in the next release, but I&#039;m not holding my breath.</description>
		<content:encoded><![CDATA[<p>Sho,</p>
<p>This comment isn&#8217;t about the performance of the different number types, but about the way they behave.</p>
<p>As I reported a while back, there seems to be no concept of integer math, which is very strange for someone coming from a C/Java background:</p>
<p>  var xx :int = 3;<br />
  var yy :int = 2;<br />
  someArray[xx/yy] = &#8220;MyStringValue&#8221;;</p>
<p>Rather than storing the value at array element 1, the Array is now broken and has a value stored under the property name &#8220;1.5&#8243;.</p>
<p>Another thing I discovered recently is that you can&#8217;t depend on the type of a number, because it can change out from under you:</p>
<p>  var nn :Number = 1.2;<br />
  trace(&#8220;nn is &#8221; + getQualifiedClassName(nn)); // outputs &#8220;nn is Number&#8221;<br />
  nn += 1.8;<br />
  trace(&#8220;nn is &#8221; + getQualifiedClassName(nn)); // outputs &#8220;nn is int&#8221;</p>
<p>This is very disturbing, because I would like to write code that serializes objects to send to a server, and metadata is not sent. The format of the binary data is well-known for each service request to the server, but on the client I would like the actual serialization code to be dumb and just examine the objects passed to it and send them along. However, I cannot depend on a Number looking like a Number so that I know to use my IDataOutput&#8217;s writeDouble method instead of the writeInt method.</p>
<p>It would be great if this were fixed in the next release, but I&#8217;m not holding my breath.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
