O'Reilly logo

haXe 2 by Benjamin Dasnois

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. The Dynamic Type and Properties

A magic type.

The Dynamic type is a type with a special behavior. Through this chapter you will learn why, how you can use it, and also what you should pay attention to. Understanding the Dynamic type is a key point in mastering haXe.

We have already been introduced to haXe's typing system. But in this chapter we will learn about something new in this typing system: the Dynamic type. The Dynamic type is a type that introduces a very special behavior that we will now study.

In this chapter we will:

  • Use Dynamic variables
  • Learn about Dynamic's pitfalls
  • Learn about the parameterized Dynamic class
  • Implement Dynamic in a class
  • Learn about the use of properties in classes
  • Implement properties in classes

Let's get started. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required