Delphi outdated? Says who!
A couple of days ago I posted a funny meme picture on Google + and Delphi Developer. In the first instance a user commented that “Delphi is outdated”, which seems to be the general consensus for non-delphi programmers around the world.
I mean I did post the image below as double-fun, meaning that yes it’s normally the other way around – so that makes the joke funny, and also funny because the roles are reversed for me (I have always had jobs given to me, I rarely ask for a job). So for me it’s actually true.
I have seen so many Java guys who just did not make the cut when things got “low-level”, ending up losing their jobs because they were not prepared for the reality of how a computer works. So while the rest of us dived head-first into winAPI services to make our RPC servers and load-balancers go faster, the Java crew silently retracted into their office, pondering why tomcat was unable to catch up with Delphi; Avoiding eye contact and stopping all the foolish “java is best” talk. Which was funny because the same gang of Java coders were initially a loud and condescending group of smocks, giggling in amusement when they heard the word “Delphi”. Only to be out-smarted, out-performed and ultimately just OUT.
When I showed the boss that creating a service took less than 5 minutes to build, and that adding a server to the win32 service was a matter of dropping a component on the data module, he just shook his head and said “Had I met you when we started this company, I would never have wasted my money on Java. I would have hired you full-time and done this in Delphi”
Some two years later and the company went bankrupt. The Java crew had eaten up years worth of unexpected salaries and built a product which was unable to cope with reality. Even though I fixed the damn thing it was too late. They ran out of road and went belly up. That would not have happened had I been allowed to do this in Delphi from day one.
Delphi not cool enough?
So.. did I miss something? When exactly did the world at large decide that Delphi is not allowed to be cool anymore? So a scripting toy like python, which could easily be written in Delphi — that’s cool. But a full on OOP compiler toolchain which produces native code for all modern platforms, that’s not cool. Where exactly is the logic in that?
Having googled around for a bit, trying to find some substance to this claim, all I find are rumors. Actually not even rumors, but more along the lines of childish thrash talk behind someones back or “name dropping” to fit in with the popular group. Yet when you try to examine where this aversion for Delphi is coming from -or if there exists any solid evidence behind this puzzling attitude at all, you find nothing.
Is object pascal about to go the way of the dinosaurs? And if so, who sat down and decided that a language en-par with the most popular and widely used language in the world, namely C/C++, suddenly has no place in the market?
Object pascal as a language compiles for nearly 20 platforms, including Nintendo and Ouya. The majority of these platforms are delivered through FreePascal, which is compatible with Delphi on almost all accounts.
With a market share in the hundreds of thousands (remember, there are only 18 million developers in the world, divided amongst all programming languages) Delphi still out-ranks python, pearl, ruby and all dialects of basic combined. Not to mention objective C which saw a sudden rise due to the fact that Apple forced people to learn that cursed dialect. And if you want an old outdated language, then Objective C is the mother-load!
Let’s face it: no-one would use Objective-C of their own free will had it not been for Apple’s nazi regime for iOS back in the day. It is the bastard love child between Modula II messaging and C, with roots so far back in time that Cobol was pushing pimples and smiling over hair appearing on its genitals. It is an atrocity cooked up in the labs at neXT and pushed in the back-door by Steve Jobs.
And then there is TIOBE, which every year runs a statistical analysis on language popularity. And it does this by searching for keywords in source-code committed to SVN, Github and various websites around the internet.
The problem? Well right from the start TIOBE decided that our language needed special treatment and rules, so instead of using keywords that would reflect reality, like “delphi”, “freepascal”, “lazarus”,”oxygene pascal”, “smart pascal” and “object pascal” and then combining this into a score which reasonably represents reality — TIOBE in its infinite wisdom decided that the word “pascal” should cover it.
This means that for the past decade TIOBE has reported only a fraction of the actual use and activity-level of our language, giving potential users a completely wrong impression.
Lately they have decided to add “Delphi/Object pascal” to their list (due to heavy complaints for years), but only as a separate language to “pascal”, which once again misrepresents the Delphi, Smart Mobile Studio, Remobjects Oxygene and Freepascal community. We all know that these different takes on object pascal represents the same user-base, with only slight alterations in dialect and features. Smart Pascal for instance have adopted several features from Remobjects Oxygene, as well as C#, but it’s still 100% object pascal. And our customers are ultimately object pascal programmers with a background in Delphi or Freepascal.
Now what kind of impression do you think this is sending to kids who want to learn programming? Object Pascal was architected to be taught in schools, with strict attention to types and syntax – in order to make sure students learn the ropes from the ground up; producing better developers and better quality code.
Even if you learn object pascal at school and decide to work with C# later, you will still have benefitted greatly from learning how to program through object pascal. You will quite frankly have a better understanding of how .net works behind the scenes, and thus be a better dot net programmer as a result.
Sadly, the impression beginners are getting from TIOBE is that Delphi and Freepascal is dead and have been steadily declining for the past decade. Which is simply not true. Hundreds of thousands of kids are learning object pascal at school in Russia for instance. We are also seeing a proverbial explosion of use in South-America, the balkans and Asia. Which means that in a couple of years time there will be a wave of developers who build, sell and provide object pascal software and services.
The fall from grace
While I can only speculate on the rumor mill, I do have a firm grasp on the “fall from grace” subject and know precisely how the impression of Delphi being outdated struck root in the IT community. And it goes all the way back to the last epoch of Borland, the former owner and publisher of Delphi.
To make a long story short, Delphi and C++ builder was the only real threat to Microsoft back in those days, and unlike the rest Borland refused to bend its knee. The end result, as we all know, was that Bill Gates personally head-hunted Anders Hejlsberg (and I mean personally) which is the author and brain behind both Delphi and dot net. Back then there was little doubt that Borland was under attack, and considering the amount of financial force Microsoft represents – the war would be lost. Everyone knew that Borland would lose and everyone was scared for the future of the language, their jobs and income.
Either way, faced with the option to die or convert to Microsoft, Anders did what most sensible people would do, and accepted the substancial (read: millions) parachute package from Microsoft; And he now works as *the* chief software architect at that very company. He is not just the author of Turbo Pascal and Delphi but also the guy behind the dot net framework, which incidentally was a Borland project – cleverly called “portable Delphi” before that.
Just stop and think about that for a moment. Every single argument you have for C#, Visual Basic dot net and the whole dot net eco-system comes from Delphi and represents the next step in Delphi evolution. What happened instead is that Microsoft killed Borland, dismantled it and in classical warlord style – brought back the most learned to work for them.
So people who say Delphi is outdated in comparison with dot net should watch it, because there is a lot of Delphi in the dot net framework and CIL architecture. That’s because it is Delphi, taken and released under the Microsoft banner. The initial specs for portable Delphi included pointers from what I remember of the article on it, but I guess that went out the window in favour or byte-code uniformity.
And the rest is history. Borland was dismantled and forced to give up its software development division, which they sold to Embarcadero. A company who inherited the monumental task of (more or less) re-building Delphi from scratch, along with a very angry user base of hundreds of thousands of Delphi and C++ Builder developers.
“I have always held the human race in high regard, until i saw a whole generation of kids ruined by java and hanna-montana.. now i genuinely believe that only a small fraction of the human race should be allowed to reproduce”
But Borland was no innocent little goddie-two-shoe company without blemish. They made some spectacular bloopers before Microsoft bitch-slapped them out of existance, like Delphi for Linux (Kylix) which turned out to be a financial disaster for both Borland and it’s technology partners. A disaster which ultimately hurt component writers more than it did Borland. Because while Borland had the finances to recover from the loss, component authors did not. They all lost money, many went bankrupt, and larger component providers like Developer Express simply decided it was enough, and stopped developing new components for Delphi after that. They still maintain their older products, but as far as new products are concerned – they are out for good.
Next there were the Delphi for dot net releases (mostly 2000 labeled variations of the product, like 2004, 2005 and 2006). These editions of Delphi were slow, sluggish and in my view – a complete waste of time. Invented only for spite in trying to out-do Microsoft at what they do best. A foolish endeavor which only served to enrage the user-base accustomed to Ander’s fast native execution philosophy even further.
Introducing the dot net framework into the product rendered it close to useless and was seen by us developers as a “capitulation to lower-standards”.
After the sale to Embarcadero, the product still lingered without any real updates while EMB built up competence in their development department, not to mention getting rid of the dot net rubbish which had turned a once lean, mean and ultra fast language into a fat, bloated ex-quarterback living on memories.
Embarcadero have in my view held their promises. Delphi as it exists now is once again a fast, lean and mean compiler toolkit – with all the bells and whistles you would expect from a top of the line programming suite.
Personally I feel Embarcadero is doing a monumental disservice to themselves and their user base in its continuing promotion of Delphi as a RAD (rapid application development) system, because RAD in our day and age means “shallow and superficial” rather than “well thought out and robust” (like RAD once used to mean).
Either way, modern language features such as generics was added years ago, as was support for iOS, Android and OS X compiler targets. Not to mention a spanking new RTL called Firemonkey which makes use of the GPU to render modern UI’s everywhere.
But just like dot net is written in C/C++, Smart Mobile Studio is written in Delphi and is 100% dependent on the native capabilities Delphi provides. This may change quite soon as a re-write to freepascal is imminent, but Delphi is still the product we use to create our alternative path.
I wont cite the complete list of changes to Delphi as a product, because the list would fill a medium size book. But for anyone to say that Delphi is “outdated and old” would be to utterly surrender all faculties of reason. If old means “more years than dot net” then at least recognize that old in this case means wisdom and experience, not death and disability.
There can be little doubt that Delphi has lost friends over the years, and I personally believe this is the source of the “Delphi is outdated and old” rumors. But heck –if you want an old language then C++ is the oldest and most cryptic of them all (!) So how can people applaud C/C++ and at the same time say that object pascal is outdated? C/C++ outdates object pascal by nearly a decade (!) Yet object pascal was created exactly to replace C/C++. Object Pascal was also engineered to be easy to learn – that’s why Turbo Pascal and Delphi has been used in universities, to be a safe path for people to learn OOP programming.
So for those of you that prefer or like to believe that Delphi is outdated, that is simply your personal pipe-dream. It is not based on fact and has no roots in reality. You are in fact suffering from a mild case of insanity.
Delphi is growing steadily and the language is just as excellent today as it was 15 years ago. Thousands of small and large computer programs are made with Delphi every month. Many of them quite famous. Here is a list of those I know about if you don’t believe me.
Turning the tide
A lot of Delphi developers have grown lazy. I still find repositories online that needs a facelift and perhaps some updated content. In most cases the repositories are very much alive, updated less than a 12 months ago — but the author’s doesn’t bother to update the text.
This is sending a wrong signal to people of less intelligence. Stupid people believe that unless something was updated yesterday, then the code must be unusable. The idea of timeless code, like a cipher routine which follows standards and principles, is sadly lost to them. I have code I wrote 12 years ago that works perfectly fine to this day. There is nothing you can do to make it more modern, because what it does and how it does it is efficient, portable and requires little maintenance.
But fact is fact: People are reacting to what they label as “old code” lingering around the internet, and they are to some extent right. So we need to clean it up (!)
If you have a repo of code somewhere that has remained idle for a couple of years, why not update it a bit? Or at least do a checkout/in to make sure the dates reflect reality.
And if you have an old Delphi website that you no longer maintain — either give it to someone who will maintain it, or spend an hour giving it a run over.
The same goes for websites that promotes Delphi. Torry’s is more than overdue for a face-lift, as is Delphitools.
Object Pascal is not just Delphi
Another factor that seems to be to complex for Java, dot net and script programmers (if we can use that title in this context) is that Delphi is a product. Delphi is not object pascal, but rather just one compiler toolchain of many which uses the object pascal language.
So when people are touting that Delphi is outdated what exactly are they referring to?
For instance, freepascal and Lazarus which are both free and open-source initiatives can be downloaded and installed on every Linux, Unix and whatever distribution known to mankind. You can target Nintendo, Playstation, Aros, Linux, Spark Solaris — heck, even the Amiga and the Raspberry PI for that matter.
And this is what people don’t seem to understand: try installing mono on the Raspberry PI, just try it. If you are lucky it will have downloaded and installed over the course of a week, and which point it will take roughly 60 minutes just to start the IDE. And this is if you can even download it and use it at all (!)
What people don’t seem to get is that programming on devices with so little CPU and memory requires a language that can scale well. C/C++ scales down just fine, as does Object Pascal. But more importantly: the code you generate for these devices must be compact and as fast as humanly possible.
If you compile your Java and mono code to a single binary (read: machine code) then that should run fine as well, but they wont be fast! Java pushes so much crap up the stack that it’s practically raping the hardware — and while mono is much better than Java, the amount of code it produces is sometimes ridicules.
Freepascal on the other hand is a Ninja on these systems. Blazing fast and with full access to 20 years of pascal evolution, you have thousands of libraries available out of the box. No other language except C/C++ can compare with this.
Smart Mobile Studio
Smart Pascal gives you full VMT inheritance in the browser. That’s right. The compiler sculpts a VMT (virtual method table) allowing you to enjoy classical OOP where no such concept exists. You also get support for interfaces, sets (not just enums), virtual and abstract methods and classes — the works!
The result is that you can finish an application which would otherwise take 3 weeks to make — in just 3 days! With top quality code generated and full support for nodeJS and even hardware controllers.
Again — object pascal is where this is happening. Typescript came afterwards and it has no where near the amount of features Smart Pascal is offering.
Below are some typical comments written by people who believe that C# and Java is so much better than Delphi and C/C++, and my reply.
“In what world is it modern to handle memory directly” (read: pointers and freeing object).
In the world where computers have memory. What reality are you living in?
“Delphi is ancient, the memory manager itself is ridicules”
Really? You obviously have worked very little on embedded systems. Being able to write your own memory manager if you so desire has nothing to do with age, but rather with flexibility and choice. When writing code for embedded systems, you dont have the luxury of retaining objects or using reference counting. Try installing mono on the Raspberry PI. Perhaps it will boot up sometime next week, if it’s able to compile at all.
“Pointers are dangerous and old-fashioned!”
A knife is dangerous in the hands of a child, but if you use it with respect and write proper code, then pointers are safe. CPU and memory is the reality of how a computer words, and just because you have been fooled into thinking an abstraction layer is reality – that is your loss. You are confusing the map with the landscape.
Have you ever written code that runs on a Nintendo DS? I have. Did you know that the screen on these devices is a file on the CF memory card? So to write a pixel you actually write a 16 bit word to a file. Try doing that without memory mapping. I feel sorry for your lack of insight.
“Having to free objects manually is a waste of time, face it, object pascal is ancient”
You seem to forget that dot net and java are written in C/C++. And if you have a look at the code written by Microsoft themselves you will see pointer types used in roughly 90% of their C# code. You should ask yourself why Microsoft is telling everyone that pointers are unsafe and should be avoided, yet they themselves use it extensively. Besides, implementing IDisposable in your object pascal objects takes 3 seconds. So your argument is childish and infantile.
“Having no support of interfaces in TObject is ridicules!”
Then you don’t understand interfaces, reference counting or how it came into being. Using interfaces is not a must, it’s an option. A programming technique which was introduced as a standard way of de-coupling access from entrypoint. There is no reason for adding the overhead of reference counting and garbage collection in object types which don’t benefit from them. And if you find it hard to write the 8+ lines of code which gives you IDisposable in your codebase, then you are either mentally challenged or lazy.
So the next time you feel the urge to say that Delphi is outdated, or that object pascal is old and has no place anymore — at least try it before you jump on the teenage bandwagon and thrash talk something you know nothing about.
Object pascal has stood the test of time, just like it’s sister product C++. It was here before Ruby and whatnot came into being – and it will be here long after these hyped up products are dead and buried.
What is old anyway? How can we say that something is outdated?
Here is what I would define as out-dated:
- When the code no-longer match the hardware and OS (read: 16 bit code)
- When datatypes no longer exist except for legacy support
- When you can no longer buy hardware (read: Amiga computers are out-dated, Commodore 64 is outdated)
- When code no longer runs without special attention (read: execute as windows 95, XP etc.. )
- Code that does not take height for widestring
So there is a lot of outdated code out there, loads of it, but the majority of Delphi code online runs just fine. But yes, there is a lot of code that needs an update in the world of Delphi — but that goes for C++ and Java as well. Loads of java code written back in the day which no longer compiles, especially code written for early swing widget sets.
As for C#, I love it! So I’m not against C# or Visual Basic at all. I love to play around with these languages, and I have written a lot of C# code for serious applications (and will work extensively with C# for the foreseeable future). But I never lose sight of the fact that without C++ running the show behind the scene, C# would be useless.