[Estimated Reading Time: < 1 minute]
I’ve been thinking for some time about the direction that the Delphi variant of Pascal is heading, and have had this poll in my back pocket for a couple of weeks. Just recently the topic has become rather prominent in the NGs, and I myself just logged a language change suggestion.
So I thought now might be a good time to “Pop The Question”, hence this weeks poll: How should new language features be introduced to Delphi?
You only get to choose one response this week. Choose wisely.
🙂
It’s kind of hard to choose between the first and second options. New features should fit in (this ain’t VB!), but there will be cases where there is no precedent and it makes sense to follow a convention that already exists.
For example, I seem to remember (a while ago) people arguing that the angle bracket notation for generics wasn’t very Pascal-like, but I think it would just look odd otherwise.
I really don’t know how anyone can say, “Aha! This does not smell like Pascal/Delphi!”
Apart from the basic syntax, Pascal has been left behind long, long ago. It didn’t even define Units, let alone any object stuff. And as for strict typing, well…
@Bruce: The distinction I guess is which you feel should be more important if there is a real choice between a workable syntax that looks/feels/smells more “Pascally” on the one hand, and mimicry of syntax from other languages on the other.
In the case of generics I think it is difficult to come up with a workable alternate syntax – marc hoffman of RemObjects has said in the past that they tried to do that for Oxygene. They ended up going with angle brackets for practical reasons, not aesthetic or “compatibility” ones, and that’s fair enough.
It’s not too big a problem with generics though, as the rather awkward looking syntax can easily be concealed behind type aliases, so that the awkwardness is confined to the implementation details of frameworks.
It becomes less appealing, imho, when the syntax is forced to the fore.
@Ken: Yes Delphi/modern Pascal is fairly removed in comprehensive language specification terms from the original language, but I personally think there is still a “spirit” of Pascal.
I was particularly concerned by Allen Bauer’s post demonstrating an version of the Oxygene “using” syntax, but implemented with generics and anonymous methods.
It was undeniably a functional representation of the intended “feature”, but a defining characteristic of Pascal/Delphi is that it hides implementation complexity behind natural looking language.
Sets and sub-range types immediately spring to mind.
Can’t find the post you are referring to, but the “using” syntax rings a bell tuned to C#.
But I challenge anyone to try the following: get one of the historic versions of Turbo Pascal from the Borland archives (I hope they’re still there!), and try do something non-trivial with it for a few hours. Strange experience!
I had cause to do just this some time ago, digging up old Turbo Pascal 4 code (jep, I’m old and gray). I began to wonder if this was the same programming language! So much of what to me is Borland/CodeGear Delphi Pascal is just not there.
Borland/CodeGear introduce features, some with major implications, even down to affecting your coding style, but usually only after much consideration. And we moan like crazy. This has always happed, every time. Most recent example: Unicode strings. Then we settle down, and the new foreign body becomes part of what we consider “Delphi”.
My point is, Delphi is not static. It must change and develop to stay relevant. The spirit of Delphi is defined by those producing the language, and after an initial jarring experience, we learn to use each new feature, and in the fullness of time, it becomes, to us users, natural looking. (gawd, what a sentence)
But I agree in general that Delphi doesn’t hide complexity as well as it’s aforementioned half-brother (my opinion) and could do with some attention there.
One choice is missing w.r.t to priority: They should work as good as possible and fit into Pascal as well as possible but shouldn’t be restricted by making it fitting into Pascal.
I strongly believe that maintaining the “look/feel/smell” of Pascal is important.
I was particularly annoyed many years ago when dynamic arrays were introduced and they didn’t support setting an arbitrary lower bound. I understand the fixed lower bound of 0 was for CORBA compatilibity, but is really a horrible C-ism.