Tuesday, May 3, 2011

What have Delphi done for you?

What have Delphi done for you?

I can say that for me, Delphi have directly or indirectly provided me with a good living standard since the introduction of Delphi 1.

Delphi may not always have been the language I programmed in all the time. Actually alot of my carreer have been spent on developing in C, C++ and C#. But Delphi is always the language I return to. It simply feels better for the most part.

Does it contain all the features that other languages have?

Compared to C, yeah.. there is unsurprisingly enough, no syntax structures (except for ?: ) that exists for which there is no direct equivlance in Delphi. C's force is its extremely simple syntax, that allows close to assembler control over things. And ofcourse its portability.

C++? There certainly are things in C++ that does not exist in Delphi... thank goodness. C++ was imo unfortunately mostly designed by comitee, by theoretics, and much less it seems by actual users. To its defence, C++ was designed in such a way that it was backwards compatible with C, while introducing the OOP concept. It was not the first attempt to do so, but it was the attempt that won the competition, and is now the most widely used development syntax world wide.

The good about C++ is that it can do almost anything you want it to do. There arent many restrictions but thus also not much guidance. That can often result in newly educated and/or eager C++ developers wanting to use every aspect of C++ syntax, just because its there, regardless if it actually lessens overall maintainability. Maximum flexibility in all areas, specially with regards to readability/maintainability of the source, is not an advantage for C++.

C#. Its no surprise that C# is a nice language. It was afterall influenced by some of the same people that helped build Delphi. C# is a nice langauge. It however seems to be prone to bloating over time. It started out as a clean one syntax language, and now have elements of functional programming and other things mixed into it. It may be a fair choise of features for now, but Im worrying how it will look in 10 years time.

Adding new features are not always improving the language, C++ should have been a good scary example of that. And although Microsoft is more aware about that, they are also influenced by lobbyism from large customers from around the world. How that will pan out time will tell.

Delphi on the other hand have proven to be extremely resistant to useless feature creap over time.
It has been extremely resistant to being able to compile old source, even all the way back to pre Delphi source.

Its generally more readable than C++, and has less options for redefining the meaning of the source (largely due to the missing precompiler), and thus encourage people to write cleaner and more maintainable code.

And while maintaining readability, Delphi have been designed from start of with OOP in a simple to use and for the absolutely most part easy to read and maintain way.

Delphi even contain very useful features that doesnt exist in C++ today, like virtual class methods.
It seems to me that the object orientism of Delphi simply has been designed better from the outset than C++.

Why make so many comparisons to C++?

1) Its still the most widely used development language today.
2) Its usually implemented as a true static native compiler, just like Delphi.

One thing that C++ do a whole lot better than Delphi, and which I miss being able to do easily in Delphi, is to link 3rdparty C++ code into a Delphi project.

Its doable, but its not simple. Lots of algorithms are written in C++, and to utilize those, we today have to convert those algorithms to Delphi, which, depending on the algorithm, may be quite time consuming, and prone to error. Maintaining that code along with new 3rdparty version releases is another natural issue.

Over time, Delphi have however been able to renew itself and introduce new features when needed to stay relevant, without sacrificing Delphi the language itself or maintainability of source code.
It has been able to keep food on the table for me and so many more out there for all those years.
It has not required me to give up legacy source code, and rewrite it. I can continue to use the old source code with little or no changes at all.

I think its important to remember that old doesnt always mean obsolete. It can just as well mean mature and bugfree.

Why introduce the possiblity of new bugs in perfectly good working and documented code, by rewriting it to the new buzzword language of the day?

I see only few reasons to rewrite anything:
  • You have too much time on your hands
  • You have a sponsor that have too many money on hand
  • You didnt write the code properly the first time around, so now it needs extreme refactoring (a true potential possiblity)
  • You are coaxed by PR machines into believing that the next, around the corner, language will solve all your current, past and future problems, without realizing that they are spending money on PR and adverticement, not to help you but to earn money. There is a saying: Its better to have one bird in your hand than 10 on the roof.... anyway if you like birds :)
/We love DELPHI!
 

5 comments:

  1. Another reason to rewrite is a change of platform. While 10 years ago it was enough to only support Windows, now people more often also demand Mac, iOS, Android, Web platforms or more. This may be possible in Delphi at some stage, but not easily now. And in most code bases would require major refactor or rewrite.

    ReplyDelete
  2. I agree that the platform specific things would need a rewrite.

    But that does not mean that everything needs to be rewritten.

    All your calculations or database manipulation should be able to continue to work, without requiring a rewrite.

    To avoid rewriting everything, its a good idea to build the application with multiple abstraction levels. Then you only need to rewrite certain parts and reuse the rest.

    /We love DELPHI!

    ReplyDelete
  3. >>You are coaxed by PR machines
    Look at this article's headline and rethink if you are not coaxed by one specific PR machinery.

    >>I can say that for me, Delphi have directly or indirectly provided me with a good living standard since the introduction of Delphi 1.

    You have earned this standard of living not Delphi, it's your brain that makes your money.

    Anyway, you are welcome.

    ReplyDelete
  4. Michael B:
    >>Look at this article's headline and rethink if you are not coaxed by one specific PR machinery.

    I suppose you mean that Embarcadero/CodeGear/InPrise/Borland have had any significant PR machinery? That must be a joke.... no!... Compared to what MS and Sun (with their at that time allies Oracle/IBM etc) have put into PR, there have been next to none adverticements for Delphi.

    Sure I have used my brain to do something, but even a woodmaster needs tools, and if he cant find them he makes some. I have worked with most of the tools out there, .Net (C#/VB), Java, Delphi and many others over the years, and Delphi is the one I always come back to. Does it have shortcomings? Yes sure it has. Its not the tool for every job. But its way better than what that other blog tries to mislead people to think.

    /We love DELPHI!

    ReplyDelete
  5. Oh, hallo. Just hobbled along. Thank you for investing time into a reply.

    ReplyDelete