Language research

Compiler technology as we know it has been around for a long time. While enhancements to speed and code-generation is an endless endevour, something only limited by emerging technology, such as faster and more efficient processors, the introduction of new registers or co-processors; yet all these things considered, there is still a lot to be researched within the field of computer languages.

Just how much have our programming languages evolved over the past 25 years? This is a very important point as I see it, because our hardware has now evolved to the point where the processor spends most of it’s time in wait mode. Even an old PC that was top of the line 8 years ago has actually never really been utilized to it’s maximum potential.

Each language allows you to express a solution to a problem.
That is the nature of all programming languages.

When we compare the world of programming today with how hardware and software evolved 25 years ago we immediately recognize an imballance. 25 years ago the most popular home computer was the Amiga, which was powered by a 1Mhz motorola 68000 processor. This is the same processor that today controls washing machines and other household periphirals.

According to logic, such a computer should not be able to do anything useful in our day and age. It should not be able to produce stunning graphical effects, provide access to the internet, run emulators or indeed – provide true multitasking. Yet any Amiga enthusiast knows that this old gem is capable of quite a lot.

The reason these old computers, the Amiga especially, is capable of so much has to do with two factors. First, during the 80’s and 90’s these machines hardly changed at all. This gave programmers time to learn every aspect of the computer – and write applications that (towards the end of the lifecycle of the Amiga) utilized every drop of processing power available.

Our languages needs to evolve. Concepts such as generics are
extremely helpful and almost as powerful as they are dangerous

Secondly, the languages used to create the operative system were very different from what we have today. The operative system was a mix of assembly, C and (believe it or not) BCPL (a mixed, procedural, compiled basic language) – with some COBOL thrown in for good measure. Yet the operative system that resulted was at least 20 years ahead of it’s time. It has both multitasking, a Window desktop, not to mention advanced features only recently implemented under Linux, OSX and Windows.

Language as means of expression

While there are many programming languages on the marked, there are in reality only two groups or classes of languages:

  • Languages designed to solve specific purposes
  • Languages designed for all situations

The first group are typically not “real” languages. You cant sit down and write a boot-loader (the assembly code the computer reads from the disk when the system is started), nor can you use these to write your own compilers without herculean efforts involved. Not because it is impossible (it clearly is not, I recently found a Turbo Pascal compiler written in Javascript that generated 16bit, fully working, executable binaries) – but impractical.

Examples are:

  • Perl
  • Javascript
  • C#
  • Python
  • Visual Basic
  • Java

The second group contains languages which I call “real”, in the sense that they generate real code, they work with memory directly, they are fast and flexible enough to represent something as complex as a compiler or operative system (for instance). Examples of such languages are, not surpricingly, a rather short list:

  • C
  • C++
  • Object Pascal
  • Basic (some rare dialects)

You may be wondering why I put C# and Java in the group of unreal (read: fake) languages, especially since Java is presently powering one of the most popular mobile operative systems on the planet? This is sadly a truth with modifications because before Java is executed, a load-sequence written in assembly is used to load a stub-executable file, written in C – which in turn initializes the Java environment. And Java in the case of Android is compiled to native. With such criteria you might as well have written the operative system in Basic.

But this is not a competition about languages. It is not a debate over what language is the best, the fastest or has the most features. All the languages in the first group were designed for a specific kind of task. In the case of Java it was networking, in the case of Visual Basic it was applications via automation (hence COM and ActiveX is the format par excellence). Perl was designed to solve automation as well, but on a wider scale – making it perfect for server-side-scripting, while python is better suited for system level scripting and chores in the shell.

Each language allows you to express a solution to a problem. That is the nature of all programming languages. The more complex the problems, the more complex the language – which leaves at the end of the day C, C++, Pascal and Object Pascal as the undisputed champions since these languages were designed to describe all problems.

A note on Object Pascal

Many developers, especially younger programmers, seem to confuse Object Pascal with “something like visual basic”. It is a fair mistake to make since the syntax can look simple and are in plain english. But Object Pascal is actually the same language as C++ but using a slightly simplified syntax. Pascal was designed to replace C in schools – namely by replacing { } with the more intuitive “begin” / “end” paradigm.

What has ruined to some extent the reputation of Object Pascal was the onslaught of marketing by Borland, where “Delphi” (which is just one product, one compiler that supports Object Pascal. It does not represent the language itself, but rather sells and markets a dialect of the language) has become synonymous with RAD (rapid application development). To the unsuspecting developer who does not know the history or power of this fantastic language, it is perfectly understandable that he or she will equate “Delphi” with yet another visual basic clone.

Future evolution and research

Leaving differences in languages behind us, we have to look to the future. The needs we have today as developers are not the same we had 10, 15 or 20 years ago. There was a time in history where every major corporation hired programmers to create invoice systems – but that was long ago. The ordinary programming tasks that many, many languages were designed for (fortran and cobol in the case of economics) are long gone. Today you can buy invoice and tax components for almost any language. What was once a lucrative marked in itself – has been reduced to a drag & drop component.

Our languages needs to evolve. Concepts such as generics are extremely helpful and almost as powerful as they are dangerous, and I believe this is a step in the right direction — but at the same time it can be compared to a credit card. It buys us time to avoid evolving the actual language and thought structures we have become so accustomed to – but sooner or later we will begin to notice that perhaps, just perhaps, we could define new and better dialects of our favorite language – perhaps even mix and match features from other languages – to evolve and adapter our technology and psychological mode of navigating and dealing with abstract problems.

Quartex research

The purpose of this website and the Quartex Research IDE is not simply to provide a product or to re-implement a language. It is ofcourse imperative that the best possible support for a language is met, but it is equally important to provide a foundation for research into languages, parsers and compilation sequences.

There are many aspects of basic for instance, that are sorely missed in pascal. Strings can still not be used in a “select/case/switch” statements since only ordinal values are allowed. Dictionaries were only recently introduced through generics, and self-modifying procedures are unheard of. These are benefits scripting languages enjoy – but could they be realized in a compiled language?

The Quartex Research IDE aims to be a testbed for developers who want an alternative to present standards, be it under pascal, basic or any other language. At the moment focus is on object pascal and Javascript, but there is nothing in the way of adding more languages to the environment in the future.