In checking the incoming references to this blog over at Blogshares I noticed a new link from beyond the usual rat pack – a link from deep in PHP space. Curious, I followed, and found a circle of satire concerning a reflection on the 1974 book Pascal User Manual and Report by Jensen and Wirth made over at Lambda the Ultimate. johnlim at PHP Everywhere mentions Delphi as one of the worst for “straying from the Pascal sutra.”
At least, I think it was satire. I find it hard to imagine a PHP addict arguing the case for language purity. ;> (as this blog is run on PHP scripts and a lot of happy coincidences, I feel I’m entitled to an occasional PHP potshot!)
So, thanks for the link johnlim, but, uh… “The Oracle at Delphi” blog is over here. Allen’s gonna have a cow. (again!) ;>
Whether he was being facetious or not, I’ll confirm johnlim’s observation that Delphi has strayed from Wirth’s ideal. Purity of form is meaningless without a purpose. Form follows function. To make the language and tools more applicable to common real-world programming tasks, Borland has over time modified the Pascal / Delphi language, sometimes sacrificing purity to gain greater function or to enable simpler solutions. This is nothing new – Turbo Pascal 1.0 deviated from the Pascal norm by providing a compiler-supported string type and “+” as a concat operator. Two blasphemes in one stroke!
As the real-world has evolved, so have the real-world programming objectives and challenges. Borland has evolved the Delphi language to address those changing needs, and will continue to do so.
For example, published properties were introduced (along with class syntax) in Delphi 1 for the sole purpose of providing a simple runtime type info system rich enough to allow the VCL/RTL to automatically persist and depersist the majority of commonly used data types. Property streaming was a means to an end: WYSIWYG GUI form design and control layout at design time.
Could we have done form design without extending the language with published properties? Yes, but it would have required a lot more effort on Borland’s part, and the results would be far less elegant to use in day to day coding. When everybody in the trade was pitching CASE tools as a great way to zig, we zagged with language support for data-driven object persistence for GUI designers that didn’t generate steaming piles of never-touch-this-and-pray-you-don’t-have-to-debug-it source code.
Is the Delphi RTTI system as feature rich and runtime reflectable as systems such as Java, .NET, or Smalltalk? No. It doesn’t need to be that complicated. Delphi’s RTTI was built for a specific purpose and retained its simplicity by staying focused on the specific objective. VCL implements an object persistence framework (OPF) within specific bounds. (OPF purists really twitch when I say that, so I never miss a chance. “Frau Blucher!”)
Purity of form, simplicity and elegance are all still daily mantras for the Delphi development team. What has changed since Jensen and Wirth’s writing 30 years ago (holy cow!) is that what we are trying to make pure, simple, and elegant now is much, much larger than just a programming language. The objective is to simplify software development as a whole.