Quick Tip: Haxe compile time constants


In case you have not yet started with haxe macros (The Haxe macro system allows powerful compile-time code-generation without modifying the Haxe syntax.), you may find it difficult to implement something like inline constants you were used in your flash projects. Lets imagine you just want to “embed” a version number of your app right into the app and access it at a runtime, or you want to show a build date. In Haxe you have the option to use macros for this purpose, and this would be just a tiny piece of iceberg macros let you do. Here is a simple example how to do that.

Read the rest of this entry »