mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 23:32:42 +01:00
Author:halw
Date:2009-09-03T21:10:41.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@291 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
[[Property:title|Creating a new void-safe project]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|92cea2e9-b094-6380-2c5d-1cd1eb3038b4]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
|
||||
=Creating a new void-safe project=
|
||||
|
||||
Now that we've been introduced to the Eiffel void-safe facilities, let's look at what it takes to set up a new void-safe software project. Here we'll look at the void-safety related project settings and how the can be used. Then we'll look deeper into the use of some of the void-safe tools.
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
[[Property:title|Void-safe programming in Eiffel]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|a03568e8-eb79-70d7-04a3-6fd3ed7ac2b3]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
=About void-safe software development using Eiffel=
|
||||
|
||||
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".
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
[[Property:title|Void-safety: Background, definition, and tools]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|689f62b2-5675-5ab6-cd47-d891cf3d484d]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
|
||||
=Background=
|
||||
|
||||
@@ -70,10 +67,10 @@ We know that in the context of certain code patterns, it is clear that it would
|
||||
Here a check is made to ensure <code>x</code> is not void. Then as long as no assignments to <code>x</code> are made in the interim, a feature <code>f</code> can be applied to <code>x</code> with the certainty that <code>x</code> will be attached at the time ... and importantly, this can be determined at compile time. So, we say that this code pattern is a CAP for <code>x</code>.
|
||||
|
||||
|
||||
It is important to understand that in this example (and with other CAPs), <code>x</code> is allowed to be a local variable or formal argument only. That is, <code>x</code> may not be an attribute or general expression. Direct access to class attribute references cannot be allowed via a CAP due to the fact that they could be set to void by a routine call in some execution path invoked by the intervening instructions or possibly even different process thread. In a later [[Void-safety: Background, definition, and tools#Types as "attached" or "detachable"|section]], we well see that this is not quite such a limitations as it may appear at this point.
|
||||
It is important to understand that in this example (and with other CAPs), <code>x</code> is allowed to be a local variable or formal argument only. That is, <code>x</code> may not be an attribute or general expression (with one exception which we will see [[#Stable attributes|below]]). Direct access to class attribute references cannot be allowed via a CAP due to the fact that they could be set to void by a routine call in some execution path invoked by the intervening instructions or possibly even different process thread. In a later [[Void-safety: Background, definition, and tools#Types as "attached" or "detachable"|section]], we well see that this is not quite such a limitations as it may appear at this point.
|
||||
|
||||
|
||||
{{note|You will find a more detailed discussion of CAPs in [[Void-safe programming in Eiffel#More about CAPs|More about CAPs]]. The current list of CAPs appears in the [[Catalog of Certified Attachment Patterns]]. }}
|
||||
{{note|You will find more useful information about CAPs in [[Void-safe programming in Eiffel#More about CAPs|More about CAPs]]. Learn how certain code patterns are determined to be CAPs in [[What makes a Certified Attachment Pattern]]. }}
|
||||
|
||||
|
||||
===The ''attached syntax''===
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
[[Property:title|Catalog of Certified Attachment Patterns]]
|
||||
[[Property:link_title|What makes a Certified Attachment Pattern]]
|
||||
[[Property:title|What makes a Certified Attachment Pattern]]
|
||||
[[Property:weight|8]]
|
||||
[[Property:uuid|1a20197d-5a88-59c3-9a04-512399125661]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
Here are the Certified Attachment Patterns (CAPs) that have been approved by the Eiffel standards committee.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user