“Back in my time,” you hear the old, or frequently not-so-old, engineer, remark, “we did not need these newfangled high-level languages. We wrote it ourselves, in C. If we keep using C, instead of these memory hogs,” he (it’s usually a him) goes further to maintain, “our applications will run at blistering speeds on these new CPUs and bigger memories everyone have. We will be a miracle in our own time.”
Tempting, isn’t it? Just do things the good ol’ ways and what was once an application that could barely be run at all will now be, in modern terms, an itty bitty implementation which does not take any resources. Why not do it? Why should we expand to fill all available resources? Is Bill Gates actually sitting up in his manor, the way many imagine him, and cackles with glee as he says “consume more resources! let’s put out .NET, and add a malloc(2GB) right in the initialization code, just for one. Our friends at intel will be grateful forever.” If so, why is the open source world going along with it, moving in droves to Python, Ruby and PHP, and using “memory hogs” like compiz and GNOME? Are they so blinded by the will to be “just like Microsoft” that they copy the mistakes, too?
Perhaps not. Perhaps there is an actual reason for programs to expand. Maybe not all modern programmers are lazy bastards who are not willing to work as hard as their ancestors.
So, here’s a list of answers to the “uphill, both ways” argument:
- Some programmers can’t write in C. Perhaps a few years ago, they wouldn’t be able to be programmers at all. Now, with the expanding need for programmers, maybe they are able to do a mindless “programming” job (VB front-ends to Access or RoR interfaces to MySQL) that is actually useful to someone. Less people unemployed, more people contributing to society.
- Writing in C takes too long. If a competitor uses some language in which it is faster to bring something to market than C, he’ll win by default. This applies, of course, to classical commercial applications as well as to open-source applications (which depend on development mindshare to succeed).
- Writing in C is too buggy. People, all things about the same, prefer to use a program which crashes less, and when it crashes, does so in clean understandable ways which are recoverable. Using something other than C makes these easier.
- People *want* the program to *take resources* and *give them something useful in return, like features they did not have back when all programmers had to walk uphill both ways. They bought the new CPU and memory because they expected to accomplish more. If showing more data, auto-calculating things and rendering more accurately takes more resources, a user will be happy to “waste” his resources on these.
This is not to say C, C++ or even assembly no longer have their place. Of course they do. Sometimes using C is the only choice that makes sense, sometimes it is just better than alternatives. But the mere mention that “we used to write this in C a few years ago, and it worked fine” should not be an argument. If you’re not willing to use the best tools for the job, you can bet that someone else is, and all other things being equal, they are going to create something which is better and more popular than you — and they don’t give a rat’s tushy that a few years ago, using Python in this place was not practical. It is now…