-
Website
http://www.cuppadev.co.uk -
Original page
http://www.cuppadev.co.uk/oldbrew/what-not-to-write-in-haxe/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
Craigslist Proxy
1 comment · -1 points
-
steveluscher
1 comment · 2 points
-
BusbyTest
1 comment · 5 points
-
emcmanus
1 comment · 1 points
-
samj
1 comment · 2 points
-
-
Popular Threads
-
CSS Transform Exporter for Blender
2 weeks ago · 6 comments
-
Thumbnails and Palettes in glgif
2 weeks ago · 2 comments
-
CSS Transform Exporter for Blender
// Common.hx
#if flash9
typedef Bitmap = flash.display.Bitmap;
typedef BitmapData = flash.display.BitmapData;
....
#else neko
typedef Bitmap = noflash.Bitmap;
typedef BitmapData = flash.display.BitmapData;
...
#end
Then from your code you only need to "import Common".
The 115 Array Size is entirely arbitrary, it's just a temporary bugfix for a current Neko compiler issue that will be addressed in next version.
31 bit integers are part of the Neko specification (see http://nekovm.org). It's true that there is no crossplatform Int32 API right now, but that can easily be defined in haXe using inline methods.
I'm surprised that i didn't figure that sticking the #ifdef'd stuff in Common.hx would be possible with haXe. Still, now i have an excuse to take a second look. :)
- you can now remap packages with --remap flash:noflash (to fix your first problem)
- array bug has been fixed in neko 1.7.1
- there is crossplatform haxe.Int32 support (and crossplatform haxe.io + haxe.io.Bytes as well)
Great to see all of those quirks fixed. My only criticism would be that Int32 is still not treated as a normal integer type, so code ends up filled with quirky looking "Int32.dothis(Int32.dothat())" statements. Would have thought if you could abstract the whole language onto another, you'd be able to abstract the Int32 as to act as an Int as well.
Regardless, i actually managed to compile hiscumm in haXe 2.0 with very minor modifications. Only problem is, to use the new haxe.Int32 stuff i have to re-do the whole IO code again. Eeek!
Still, i'm very pleased with haXe 2.0, and look forward to future uses of it in production environments. :)