Chapter 2. Becoming a Delphi Language Ninja

In this chapter, we will cover the following recipes:

  • Fun with anonymous methods – using higher-order functions
  • Writing enumerable types
  • RTTI to the rescue – configuring your class at runtime
  • Duck typing using RTTI
  • Creating helpers for your classes

Introduction

This chapter will explain some of the not-so-obvious features of the language and the RTL that every Delphi programmer should know. Anonymous methods, enumerable types, extended RTTI, and class helpers are powerful tools for every Delphi developer, but usually they are not mastered as they should be. In this chapter, there are ready-to-use recipes that use these concepts to implement something really useful.

Get Delphi Cookbook - Second Edition 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.