Void safety: an Eiffel first that lets you sleep at night

Do null pointers keep you awake?

In all major programming languages and environments except one, a sword of Damocles hangs over every single program, regardless of how much you have tested it. Object-oriented programs perform qualified calls, x.f (…), and there is ever the risk that x might someday, unpredictably, become “null” (or “void”). Then the program crashes and there is nothing to do than try to mitigate the results, calm down the angry customer, try to reproduce the problem (good luck!), and hope that there is no other such time bomb in the program.

The null pointer is the bane of modern programming. It has caused countless projects countless agony, and cost the industry and society billions in failures and lost productivity.

Programs will always have bugs, and null-pointer dereferencing is an inevitable unpleasant consequence of having pointers or references in modern languages. Right?

Wrong. You don’t have to settle for mediocrity and its resulting disasters.

Void safety: null-pointer dereferencing is gone. As in: gone forever.

Eiffel is the only modern, widely available programming language that has solved null pointer dereferencing once and for all. With Eiffel’s void safety mechanism, a pointer (reference) can never be null when you need to use it in a call. Period.

The Eiffel compiler is the mechanism that guarantees void safety. For the compiler to accept the call x.f (…), it has to be sure that x will never be void (null) at that point in the program. If there is any risk it could, the compiler will tell you why, and you will make the simple change that avoids the problem.

Once the program has been compiled, you do not need to stay awake worrying that somewhere on a site that’s running your program some pointer in some call will suddenly go null. It just cannot happen. Welcome to the new era of modern programming: simple, clear, powerful — and safe.

The most innovative language and compiler around

Void safety is just one example of the many powerful advanced language features that are unique to Eiffel. We continue to programming language development at the forefront of modern research, but with the core goal of making the results available directly to our users. We publish in the most selective conferences and journals, getting validation from the topmost scientific authorities, as confirmed by the many international scientific awards received by Eiffel, from the ACM, the IEEE and many other bodies. But our research is immediately turned into practical, simple, reliable mechanisms.

Along with void safety, major Eiffel advances include agents, providing a type-safe higher-order function mechanism in an object-oriented framework, the SCOOP concurrency mechanism, safe conversions, and many others that make Eiffel programming both fun and rigorous.

Want to put null pointer dereferencing to where it belongs?

To the dustbin of history, that is where it belongs. Let programmers using other approaches worry about pointers gone wild. Try the safe alternative and sleep at night. Experience void safety for yourself by downloading EiffelStudio and following the instructions on Void Safety in the Eiffel Documentation.