High-level language design

Every day we program ourselves and each other to reach a desired end result. We often use simple instructions, for example: “When the traffic light switches to green, drive up to the fourth side street, turn right and go straight on to the roundabout.”

For computers, a list of such instructions forms a programme, written in a programming language. Ever since the very first programming languages were invented in the 1950s, computers have developed spectacularly fast. More and more programming languages have been invented, with the count already at several thousand. Eelco Visser (Antoni van Leeuwenhoek Professor and head of the Programming Languages Group at TU Delft) said that this process is far from over: “The natural languages that we speak as humans evolve with us. In the same way, programming languages must evolve with computers, and we are getting better at understanding how to do that. Based on our evolving understanding, I want to make it easier to develop new programming languages.”

From low to high level

The principle of ‘easy does it’ lies behind many developments in the evolution of programming languages. As computers became more complex, programmes were quickly divided into a low-level languages, which directly control the machine, and high-level languages that are better suited to use by human programmers. Translating from a high-level language to machine-friendly low-level instructions is the work of the compiler. As Visser's favourite quote (by programming pioneer Alan Perlis) summarises it: “A programming language is low-level if the programs in it occupy themselves with irrelevant matters.” Visser’s research strips programming languages, and even the creation of programming languages, of all irrelevant details. He calls this ‘abstraction’. A higher level of abstraction helps programming language designers and programmers to focus all their attention on what their programs should be able to do.

‘Easy does it’ – driving the evolution of programming languages

Language workbench Spoofax

An important reason behind the constant development of new programming languages is the trend towards domain-specific languages. Easy programming depends on a programming language that connects seamlessly to a specific application, such as a web shop. The closer the language is to the application, the faster the programmer can work and with fewer errors. This is why we developed Spoofax – a platform/language workbench that enables lightning-speed development of new ready-made domain-specific languages. Spoofax uses fixed components in programming languages, capitalising on the many similarities in the implementation of programming languages and re-using them. We can make reasonable and broad assumptions about the design of a programming language, and Visser's platform links fixed components and assumptions to an outline design of the new language in the making. The result is a fully functional language, arrived at without the designer having to think about the details. Visser: “Developing a new programming language can take years and lots of money. With our workbench, students can build a small programming language within a semester.”

Language designers working with Spoofax come up with a grammar and some other basic rules that the language has to comply with. They put them into the workbench, and out comes a ready-made programming environment, allowing users to start programming in the new language right away.

A complete programming language, without thinking about the details

More results with less work

Two advantages of new programming languages are well known: speed and security. Do these issues concern Visser? “Programmers like to do difficult things: the more difficult the better. We have focused on making it all easier, because ‘better’ programming languages are not necessarily the programmer's friend. Our innovations are in great demand, not least because a new language can be safer when it is designed to exclude common security risks, saving the programmer a lot of headaches.”

Visser said that increased productivity is also important: “We now have a major shortage of computer scientists. The number of students in our programmes has risen in recent years, but it is still not enough to meet demand. If we can get programmers to do more with less work, that's a win, and I don't see our workbenches causing any job losses. They will, however, help to further increase quality. Don't forget that without the very first 1950s programming languages, we would never have been able to realise today's software in our smartphones and laptops.”

17 million programmers

So, should every child learn to program? Visser has given this a lot of thought, and again he distinguishes between general principles and implementation details: “Take Microsoft Excel, for instance. This is actually a programming environment that, just like Spoofax, takes care of the irrelevant details. Because it is designed as a spreadsheet, you can program simple mathematical formulas without too much prior knowledge, and we have all become programmers as a result. Nonetheless, it would be good if people knew more about the general principles: How do you describe what a program should do? How do you process data? What is automation? I'd rather help people to know a bit more about that than train 17 million certified programmers.”

Programmers doing more with less work – that’s profit

Rough edges

In the midst of the pandemic, Visser had something to celebrate with an award for Spoofax at the end of 2020 by the leading programming conference OOPSLA. “We received an award for the impact of our original 2010 publication, which described the principles behind Spoofax – work we had been doing for the previous ten years. We have come a long way since then, so the prize felt like the culmination of twenty years of work.”

Visser acknowledges that Spoofax is not currently the most popular language workbench of the ten or so available. “We take a really fundamental approach to creating a new programming language, by capturing as many language aspects as possible in a 'meta-language'. We try, for example, to understand how grammars work so that we can automatically derive all relevant ingredients from it. This is an important difference. It is not so much the workbench itself that has an impact on the field, but more our search for these fundamental principles. Spoofax itself is primarily a research tool with rough edges, to which we keep adding things.”

Dynamic semantics

Visser's wish list of additions to Spoofax includes insight into so-called dynamic semantics. Whereas static semantics describes what a healthy programme looks like, dynamic semantics describes how the programme and its execution are connected. “We have mastered static semantics, so now we want to be able to express dynamic semantics as well. How should a programme behave during its execution? Can we derive general principles from this? The answer to these questions can help to further simplify the creation of new languages. It's a challenge we've been working on for some time but haven't quite figured out yet.”

Because Spoofax was new, I started developing applications myself

Web programming language

Visser wants to market Spoofax more widely, which means persuading companies who are mainly interested in proven technology. “Because Spoofax was new, I started developing applications myself. I had no teaching commitments for a year, and I used that time to create the web programming language WebDSL. It is specially tailored to the complexities of programmes that work over the internet.” Visser put together an 'academic workflow engineering team' to deploy WebDSL in the academic working environment, for applications in high demand at universities. “Think of programming training via the internet browser, or annual course evaluations and online tools for scientific conferences. Instead of constantly reinventing the wheel, we make ready-made solutions with WebDSL. These are now widely used in Delft and at other universities. It saves my colleagues and me a lot of time. We receive feedback from the field, and thanks to the ease of use of WebDSL we can process it immediately – it’s really worthwhile.” Visser is determined to use his web programming language in other sectors as well.

Irrelevant matters

The short distance between user experience and program improvement is something Visser is interested in: “You only discover what you really want when you actually start working with new programs. New ideas and requirements emerge immediately, which you can use to steer further development. And the closer the programming language is to the application, the easier it is to implement these improvements.” This is an achievement Visser is proud of, and one that he said ties in with his favourite Alan Perlis quote mentioned earlier: “Our workbench takes the irrelevant stuff out of your hands, so you can focus on the essentials. This allows you to achieve functionality much faster, and with fewer people. That is what we have achieved in recent years, and it’s what I want to build on still further in the coming years.”

Eelco Visser

(1966 - 2022)

On Tuesday 5 April 2022, our dear colleague and friend Eelco Visser unexpectedly passed away. Eelco was professor and head of the Programming Languages Group (faculty EWI) at TU Delft and was an expert in the field of programming language design. In one of his latest interviews (this article), Eelco told us that he thought that just like natural languages evolve over the years, programming languages should also evolve with computers. "We understand programming better and better. Based on that progressive understanding, I want to make it easier to develop new programming languages," Eelco said.

But Eelco will not only be missed in the area of research. Eelco was also a visionary in education, with strong ideas for both bachelor and master education. As a great advocate of tool-supported programming education, he led the development of Weblab, a learning management system that is in use for a range of programming languages and courses. And in his master's courses, he got students to work with the Spoofax workbench, which allowed them to design and implement their own ready-made domain-specific languages in no time.

Eelco was tenacious, well-informed and always driven by content. A researcher in heart and soul who will be greatly missed.

In Memoriam of Eelco Visser

/* */