<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
More explanations ...<br>
(french translation afterwards)<br>
<br>
On 09/30/2009 06:05 PM, Mildred Ki'Lya wrote:<br>
<blockquote cite="mid:4AC381BF.9010309@gmail.com" type="cite">Now,
Bertrang Meyer's version of Eiffel have something to avoid calls
on NULL:<br>
  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://bertrandmeyer.com/2009/08/04/void-safety-getting-rid-of-the-spectre-of-null-pointer-dereferencing/">http://bertrandmeyer.com/2009/08/04/void-safety-getting-rid-of-the-spectre-of-null-pointer-dereferencing/</a><br>
  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://docs.eiffel.com/sites/default/files/void-safe-eiffel.pdf">http://docs.eiffel.com/sites/default/files/void-safe-eiffel.pdf</a><br>
  <br>
</blockquote>
<br>
The main idea in this paper is that types can be either attached or
detached (a keyword specifies this)<br>
<br>
Variables with unattached types can contain NULL values. This is the
default for most languages.<br>
<br>
Variables having an attached types are not allowed to contain NULL.
This is checked at compile time by ensuring that these variables cannot
be affected with unattached expression. If you want to affect them with
unattached expressions, you have to check for NULL before.<br>
<br>
Now, the compiler can give you an error when you try to call a slot on
an unattached variables because this may be a cause of call on NULL.<br>
<br>
<blockquote cite="mid:4AC381BF.9010309@gmail.com" type="cite"><br>
  <hr size="2" width="100%"><br>
La version d'Eiffel de Bertrand Meyer a corrigé ce problème pour éviter
tout appel sur NULL:<br>
  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://bertrandmeyer.com/2009/08/04/void-safety-getting-rid-of-the-spectre-of-null-pointer-dereferencing/">http://bertrandmeyer.com/2009/08/04/void-safety-getting-rid-of-the-spectre-of-null-pointer-dereferencing/</a><br>
  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://docs.eiffel.com/sites/default/files/void-safe-eiffel.pdf">http://docs.eiffel.com/sites/default/files/void-safe-eiffel.pdf</a><br>
  <br>
</blockquote>
<br>
L'idée principale de ce papier c'est qu'un type peux être soit attaché
ou détaché (un mot chef est rajouté au langage).<br>
<br>
Les variables avec un type détaché peuvent contenir des valeurs NULL.
C'est le cas par défaut pour la majorité des langages.<br>
<br>
Les variables avec un type attaché ne sont pas autorisées à contenir
des valeurs NULL. C'est vérifié au moment de la compilation. Le
compilateur vérifie que ces variables ne peuvent pas être affectées par
des expression de type détaché. Si on veut tout de même faire une
affectation, on doit vérifier que l'expression n'est pas NULL avant.<br>
<br>
Cela permet au compilateur de signaler une erreur lorsqu'il y a un
appel sur un type détaché, car il est la cause potentielle de crash
"call on NULL".<br>
<br>
<pre class="moz-signature" cols="72">-- 
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <a class="moz-txt-link-rfc2396E" href="mailto:mildred@jabber.fr">&lt;mildred@jabber.fr&gt;</a>
│ Website: <a class="moz-txt-link-rfc2396E" href="http://ki.lya.online.fr">&lt;http://ki.lya.online.fr&gt;</a>           GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
</pre>
</body>
</html>