Friday, February 25, 2011

Introductions

Greetings, and welcome to Bleeding-edge Delphi. Over the next several months, I will be writing about a number of ideas and techniques related to creating software using Embarcadero Delphi XE. What will I be writing about? Well, it’s probably easier to explain what I won’t be covering: I’m not going to discuss component libraries, or the IDE, or database reports, or unit testing, or agile development, or any other more or less conventional Delphi-related topic. Instead, a few of the topics that I will be covering are (in no particular order):
  • Pure functional programming - No mutants allowed!
  • Lazy evaluation and memoization - Don’t do today what you can put off until tomorrow, but if you ever do do it, save a copy.
  • Type trickery - Just how meta can you get?
  • Concurrent programming - When threads collide…
  • Parallel programming - When threads collude…
  • Domain-specific languages - Don’t like Pascal? Create your own damn language.
In other words, I’m going to be writing about stuff that you probably aren’t using yet, but you might find interesting, and possibly even useful. And, perhaps more compelling, it’s stuff that I think is going to be more and more important to programming in general as time goes on.

Why these topics?


I’ve always been driven by the idea that, no matter what you’re doing, there’s always a better way. In programming, for me at least, “better” means a number of things:
  • better = more correct - How do I write software that is more likely to work right the first time?
  • better = simpler - How do I write software that’s easy to understand when I come back to it a year later?
  • better = more efficient (to create) - How do I get a software idea from my brain and into the computer more quickly (without compromising correctness and simplicity)?
  • better = more efficient (in operation) - How do I write software that takes full advantage of advanced hardware features, like multi-core CPUs?
Each of the topics listed above addresses one or more of these definitions of “better.”

Why Delphi XE?


I’ve been a Delphi programmer since before it was Delphi (I started with Turbo Pascal 3.0 way back in 1986). The Delphi environment has always been an excellent platform for application development. But Delphi’s Object Pascal has been showing its age for a while now, lacking many of the sophisticated concepts that have driven the evolution of more “modern” languages. However, the introduction of generics (parameterized types) and anonymous functions in Delphi 2009 was a big step in the right direction. Unfortunately, the implementations of those ideas, in both Delphi 2009 and Delphi 2010, were, frankly, just a little too buggy; the compiler basically fell apart if you tried to be at all creative. In Delphi XE, finally, these features are mature enough that “pushing the envelope” is no longer synonymous with “exploding in a flaming fireball.”

There’s still a ways to go—inflexibility of the Object Pascal syntax, limits on static typing capabilities, etc. are all hindrances—but I hope that at least one of the consequences of my musings here will be to stimulate thinking about how to better incorporate advanced programming concepts into the language.

No comments:

Post a Comment