type system. The type kinds it offers are classes, interfaces, function-method types, anonymous types, algebraic data types (called enum in Haxe), and abstract types. Parametric polymorphism is possible with classes, algebraic types and function types, giving the language support for generic programming based on type erasure. This includes support for variance in polymorphic functions, although not in type constructors. The type system is static unless annotations for dynamic typing are present, for use with targets that support them. Type checking follows nominal typing with the exception of anonymous types where structural typing is used instead. Finally, type inference is supported, allowing for variable declarations without type annotations. Modules and namespaces All Haxe code is organized in modules, which are addressed using paths. In essence, each .hx file represents a module which may contain several types. For example, to create the type A in the package my.pack as shown, the folder structure should be my\pack and the file could be A.hx in the folder pack. // file my/pack/A.hx package my.pack; class A {} In other modules, other types can be imported by putting import statements below the package definition, e.g. import my.pack.A; A module can contain multiple types, such as the following. It is possible to import one type at a time from that module, using import my.pack2.A;. A type may be private, in which case only its containing module can access it. package my.pack2; typedef A = {a:String} private typedef B = {b:String} Classes Classes (keyword class) in Haxe are similar to those in Java or TypeScript. Their fields can be either methods, variables, or properties, each static or per instance respectively. Haxe supports the accessors public and private, and more advanced methods for access control that are denoted using annotations. Methods and static constant variables can be inlined using the keyword inline. Fields can be marked as final to declare a constant that must be initialized immediately or in the constructor and cannot be written to, in case of function final will mark as non-overridable in subclasses. Interfaces in Haxe are very similar to those in, for example, Java. interface ICreature { public var birth:Date; public var name:String; public function age():Int; } class Fly implements ICreature { public var birth:Date; public var name:String; public function age():Int return Date.now().getFullYear() - birth.getFullYear(); } Generics Haxe supports generic programming. The following is an example of the identity function. function identity<T>(arg:T):T { return