Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Saturday, June 21, 2008

AS3 starting to look like Cocoa

Saturday, June 21, 2008   

Took a look at some cool betaruce code and ActionScript is starting to look a little like Cocoa (meaning kind of jumbled and ugly to look at... Cocoa code has eight billion brackets):

// original position
public var oldV:Vector.Vector.<Vector.
<Point>>;
// target position for vertices after click and each drag public
var newV:Vector.Vector.
<Vector.<Point>>;
// coordinates for rendering e.g. when point going to final pos
public var renderV:Vector.
<Vector.<Point>>;
I imagine it will only take usage and time to get used to,
but those vectors honestly look pretty ugly.


 
 Return to the main page
Comments:

There are currently 3 Comments:

Anonymous Matthew Fabb said...
“I've never programmed in Cocoa before, but definitely agree with you that it looks jumbled and ugly.

Note that this inclusion of Vector in AS3 is based on ECMAScript 4 spec, meaning this kind of notation will also eventually be seen in JavaScript 2.0.”
 
OpenID bunnyhero said...
June 22, 2008 2:37 AM
“it also reminds me of C++.”
 
OpenID pixelero said...
June 25, 2008 6:41 AM
“I didn't test this code, but having a brief look I think there's one 'Vector' too much:

public var oldV:Vector.<Vector.<Point>>;

Now that's much more clear and beautiful, isn't it?”
 
 Leave a comment