Summary

In this chapter we learned about the Dynamic type and the dynamic keyword.

Specifically, we covered what the Dynamic type is, what the parameterized Dynamic type is, and how you can implement both in your own classes. We also covered how you can use properties.

Dynamics can be useful but remember to avoid overuse them as they can break your code at runtime.

On the same note, remember that properties are a compile-time feature only.

In the next chapter, we are going to learn about other things in the typing system such as Enums and Interfaces.

Get haXe 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.