mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Update wikipage Void-safe programming in Eiffel. (Signed-off-by:b-meyer).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1709 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -5,13 +5,11 @@
|
||||
|
||||
When you develop software in Eiffel, you can be assured (at compile time) that your system will not attempt (at run time) to apply a feature to a void reference. That is, Eiffel prevents situations in which systems fail at run time with the error: "Feature call on void target".
|
||||
|
||||
Throughout the history of Eiffel, a small number of important new capabilities, agents for example, have been added. Always these innovations have added significantly to the power of Eiffel, and have been carefully designed to cause a minimum of impact on existing software. Void-safe Eiffel is such an innovation.
|
||||
Throughout the history of Eiffel, important new capabilities, such as agents and the SCOOP concurrency mechanism, have been added adding considerable expressive power to the language while causing minimum impact on existing software. Void-safe Eiffel is such an innovation; in this case the innovation does not add any new expressive mechanisms, it ''removes'' a major source of instability in programs (present in all other major languages): null-pointer dereferencing. To say that Eiffel is void-safe means that such catastrophic yet common errors simply will not occur.
|
||||
|
||||
However, it is not quite right to refer to it as "void-safe Eiffel". In fact, it is Eiffel ... and it is void-safe, just as it is statically typed.
|
||||
There is in fact no need to speak of "void-safe Eiffel". The language is just Eiffel ... and it is void-safe, just as it is statically typed. We still occasionally refer to "Void-safe Eiffel" simply because until 2005 or so Eiffel was not void-safe (we had to start somewhere), and you may still encounter older documentation that talks about "void calls" (null-pointer dereferences). But in today's Eiffel void calls are impossible.
|
||||
|
||||
Still, the reality is that Eiffel did not always provide void-safety, and that has the potential to cause confusion among both new and seasoned Eiffel developers. New developers will find for awhile that parts of the Eiffel documentation were written prior to the advent of void-safety, and may not have been updated yet. Experienced Eiffel programmers will find that software that compiled in versions of Eiffel before it became void-safe, may not compile anymore with void-safe capabilities enabled.
|
||||
|
||||
The result is that we must consider certain questions:
|
||||
The rest of this chapter goes through the following topics:
|
||||
|
||||
# How is void-safety defined?
|
||||
# What are the specific elements of the mechanism for void-safety?
|
||||
@@ -19,7 +17,6 @@ The result is that we must consider certain questions:
|
||||
# What do I need to know to produce standard Eiffel software?
|
||||
# What do I need to know to convert my existing systems to be standard?
|
||||
|
||||
To find some answers, continue reading this chapter.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user