The Standard Data Types
Standard types, or standard data types, are the ones you use in your application to store simple values.
The standard types in haXe include:
Int
Float
String
Bool
Void
Dynamic
There are a couple of other types that can be considered part of the standard type list, but they are more
of a toolset and form the basis of more complex topics discussed later in the book, so you will not find
them here.
Unlike many languages, the standard types in haXe are more so containers or identifiers that embody
the simple values they represent. This provides an avenue with which to leverage object - oriented
programming in haXe, by facilitating a means to literally extend the values type into a more complex
object.
Variables
haXe is a statically typed language. This means that, when you declare variables, the compiler needs to
know what type of data will be assigned to the variables so that it can deal with them efficiently. There is
some debate in the programming communities that dynamically typing languages is often a better
??‘
??‘
??‘
??‘
??‘
??‘
??‘
??‘
??‘
??‘
??‘
??‘
Chapter 3: Learning the Basics
29
solution.
Pages:
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88