Saturday, June 21, 2008
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.




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...
 


“it also reminds me of C++.”
 
OpenID pixelero said...
 


“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?”
 
Post comment

Links to this post:


Create a Link

gotoAndStop( topOfPage );