Eiffel: A viable candidate as a language for the Gnome platform ?

Eiffel: A viable candidate as a language for the Gnome platform ?

It was 2004. Linux were labelled as a cancer by Ballmer, Android and iPhone didn’t existed. Multi-core CPU were still high-end. It was a different world.

From archive.org, before it got lost…. Twelve years ago. And it was shown to the world on slashdot:

Eiffel as a Gnome Development Language ? 397

Thomas Delaet writes This article is a short evaluation of Eiffel as a language for developing the core gnome desktop platform. Last month, there has been a heavy debate about a successor for C/C++ as the language of choice for developing the core gnome desktop components in. The debate has mostly focussed around C#/Mono and Java. This article tries to summarize the different requirements for a gnome development language and shows how Eiffel fits in these criteria.”

Eiffel: A viable candidate as a language for the Gnome platform ?

Overview

I followed the debate about a successor for the C/C++ combination as the primary language for developing the Gnome core desktop platform very closely last month. There has been discussion about a number of options (Stick to C/C++, Build a third language and platform set, Open source Java subset, C# plus GNU Classpath, C# plus third platform and C# and IKVM). What I would like to do on this page is give an overview how a probably less well-known language might be a viable compromise as a C/C++ successor. This language is called Eiffel and exists for over a decade. Eiffel takes the principle of Object-Oriented programming to its extremes and, as a consequence, is a very easy to learn language.

I’ll first try to summarize the different requirements which need to be fullfilled, then I’ll explain why and how Eiffel addresses these requirements.

Language Requirements

Following the debate until now, I think there are a number of requirements which need to be fullfilled when we choose a C/C++ successor:

  • Language Bindings: We can’t expect that all third-pary applications are coded in the same language, so our solution needs to have the ability to expose it’s API’s to other languages.
  • Incremental Transition: The language of the core Gnome components won’t be switched overnight. We need a steady transition path.
  • Open, community-driven language specification: It’s unacceptable that the language is controlled by a single company. The language specification needs to be open and the standardization process needs to be community-driven.
  • Free compilers available: We can’t expect the different Unix-distributions to rely on proprietary compilers. There has to be a free compiler available for the language we choose.
  • Free Libraries available: Same arguments as above. The core libraries for our solution need to be free.
  • Free from politics: Our ideal solution needs to be free from politics. We don’t want to loose one of the big supporters of the Gnome desktop platform.
  • Development Tools: It would be nice if there’s an IDE available for this language.
  • Easy of use: The reason why we’re questioning C/C++ is that a higer-level language would result in higher code efficiency. We expect garbage-collection, an easy to use syntax and reusability (less code to write).
  • Efficiency: The language needs to be efficient. This is the reasen why so much software is still written in C/C++.
  • Portability: The language needs to be portably to different platforms and operating systems.

Eiffel as a solution ?

I think the Eiffel language provides a good solution for all of the above requirements:

  • Language Bindings: Eiffel has good mechanisms to interact with other languages through the “external” keyword. There’s good support for calling C, C++ and Java methods. Eiffel code is typically converted to C code (and then to machine code) or Java-bytecode. There is also a (commercially available) compiler for .NET
  • Incremental Transition: Eiffel not only has the ability to call methods in other languages, but can also expose methods to other languages (through the CECIL framework). By using these two techniques we have very flexible framework for interaction with other languages.
  • Open, community-driven language specification: The Eiffel language is controlled by a not for profit organization, namely the NICE consortium. Everyone can become a member of the NICE consortium.
  • Free compilers available: The SmartEiffel compiler is a stable and free compiler which has the ability to compile Eiffel code to C or Java bytecode. There are also other (commercially) available Eiffel compilers. The most well-known is probably the compiler which comes with the Eiffelstudio environment
  • Free Libraries available: The Smarteiffel-libraries are in the public-domain. There is also a (high quality) library package (GOBO) available which works with all the Eiffel compilers.
  • Free from politics: Since the language, the compiler and the libraries are open, I don’t see why anybody would have any legal objections against this language.
  • Development Tools: EiffelStudio provides a very nice IDE. There are also a number of free tools (lexer, ant-like-tool, parser, junit-like-tool, debugger) included in the GOBO library-package.
  • Easy of use: Because of it’s simplicity and small syntax (measured by the number of keywords), Eiffel is a very easy language to read and write. It is a fully object-oriented with garbage collection. Eiffel has also built-in support for design-by-contract (this concept was pioneered by Eiffel) and versioning support (you can declare methods as obsolete).
  • Efficiency: Since Eiffel is typically compiled to C, the efficiency of execution of a large Eiffel program (as a desktop component would be) is comparable to the efficiency of a regular C program.
  • Portability: Because Eiffel is compiled to C it can run on every platform for which there is a C compiler available.

Conclusion

I personally think Eiffel is a very good fit as a language for developing a big software-project like the Gnome desktop platform. Eiffel has been designed with large collaborative software projects in mind and has the potential of tremendously improving developer productivity. So I think it would be a wise thing to consider Eiffel as one of the alternatives in the discussion about a C/C++ successor for the Gnome desktop platform.

Thomas Delaet (thomas at delaet.org)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.