Prev | Current Page 214 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The latter is very practical in some specific context and until
recently was the preferred choice for scripting languages such as VB and JavaScript, but the former
has proven over the years to be an effective way to write codes easier to maintain and reuse.
haXe is a recent language and has embraced the OOP fully, but it still maintains a great degree of
flexibility by adopting concepts of procedural programming.
In this chapter, you will learn:
What classes and objects are and how can you use them in haXe
What the differences are between instance fields and static fields
How to declare and use variables and functions in classes
How to extend classes and implement interfaces
How to work with anonymous types, typedef and enum
How to leverage on advanced features like extensions and type parameters
??‘
??‘
??‘
??‘
??‘
??‘
102
Part I: The Core Language
Classes and Objects
So, what are classes and what are they used for? Classes define a set of characteristics and
implementations, while objects are their realizations.


Pages:
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226