Archive for the ‘ Code And Language ’ Category


Eiffel Tower c.1900

Eiffel Tower c.1900 Photo from the Brooklyn Museum

I’ve been reading quite a bit about Eiffel recently – mostly as a way of exploring object orientated development further. Unlike most languages Eiffel has been designed around a consistent idea. In common with Smalltalk, it is object orientated from the ground up; it’s also as much a design methodology as a language.

The simplicity and elegance of Eiffel really appeals to me. It’s not a feature rich language – it does just enough. For example there is only one loop structure rather than the usual plethora of do/for/while/etc. Another example is that there is no concept of module. Rather classes can contain other classes (as in any language).

“Classes serve two complementary purposes: they are the modular units of software decomposition; they also provide the basis for the type system of Eiffel.”

Groups of classes are known as clusters. Though there is no language strcuture for cluster – in general this is implemented by the tool set or at the lowest level by the file system directories. Clusters can contain subclusters. Using directories in this manner is, put simply, brilliant.

There are no namespaces. In a trice, Betrand Meyer, Eiffel’s designer, avoided the argument that nearly destroyed the PHP community. Namespaces enable you to have classes of the same name in different contexts. Meyer argues that namespaces just push the possibility of name collisions up a level and make it impossible to refactor classes between clusters.

Eiffel is self documenting. Unlike Java, in which you add docblock comments, code documentation is generated from the Eiffel code itself.

Contrasting Eiffel to Java: Eiffel is small and simple to Java’s large and complex. Over the next few weeks I’m going to be looking into Eiffel in more depth including multiple inheritance, how Eiffel helps develop resuabale software components, design patterns as language constructs, developing unit tests from UML as well as examining the basic precepts of Eiffel.