<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I would have three small questions regarding
what can be expressed with type specs:</font>
<br>
<br><font size=2 face="sans-serif">        -
we can define immediate constants and even ranges for integer values (ex:
'-spec f() -> 42.' or  '-spec f() -> 0..42.'), but apparently
we cannot do the same for floats? Is there any particular reason for that
(besides the lack of meaning of exact comparisons for floating-point numbers),
or maybe it is a planned enhancement?</font>
<br>
<br><font size=2 face="sans-serif">        -
it is a still more minor point, but we are using a hashtable type in pure
Erlang, which is implemented as a tuple containing buckets. The number
of elements of the tuple is determined at run-time (depending on a targeted
ideal load factor, based on the expected number of elements to be stored
in the hashtable). We can define a type for bucket(), but for the hashtable
is there any way of expressing a more precise declaration than  '-opaque
hashtable() :: tuple()', i.e. to tell that even if we do not know the size
of the tuple, we know it will contain bucket() instances at each position?</font>
<br>
<br><font size=2 face="sans-serif">        -
what is the recommended way of handling functions that may or may not throw
exceptions? If otherwise returning a type T, should we use T | none() or
T | no_return() as return type, or should we consider that type specs focus
on actual return types under normal circumstances, and that exceptions
are in "another dimension"? I suppose it is the latter option,
but then one could imagine that type specs for functions could be enriched
with exception specifications, for example to check whether a catch clause
has any chance of being triggered at all?</font>
<br>
<br><font size=2 face="sans-serif">Thanks in advance for any hint,</font>
<br><font size=2 face="sans-serif">Best regards,<br>
<br>
Olivier.<br>
---------------------------<br>
Olivier Boudeville<br>
<br>
EDF R&D : 1, avenue du Général de Gaulle, 92140 Clamart, France<br>
Département SINETICS, groupe ASICS (I2A), bureau B-226<br>
Office : +33 1 47 65 59 58 / Mobile : +33 6 16 83 37 22 / Fax : +33 1 47
65 27 13</font><font face="monospace"><br>
<br>
<br>
Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.<br>
<br>
Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.<br>
<br>
Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.<br>
____________________________________________________<br>
<br>
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.<br>
<br>
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.<br>
<br>
E-mail communication cannot be guaranteed to be timely secure, error or virus-free.</font>