Re: Generic classes with number as arguments

Dominique Colnet <[email protected]>
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
LEMAITRE Guillaume wrote:

> Yes, I know that :)
> 
> I patched the 'numeric' library in order to have the following hierarchy :
> 
> NUMERIC <-----|                      |-- INTEGER_GENERAL
>               |-- NUMERIC_GENERAL <--|
> COMPARABLE <--|                      |-- REAL_GENERAL
> 
> so, I have full backward compatibility, and now I can write
> 
> class TOTO[ N -> NUMERIC_GENERAL ]
> 
> feature
> 
>   constraint : N is
>     do
>       -- ...
>     ensure
>       good_value : result > result.zero
>     end
> 
> end
> 
> Maybe this patch should be applied to the main branch of se ? 
Keep cool. A modification to INTEGER /REAL is never harmless even when 
it seems obvious. It needs to be checked first (advantages Vs drawbacks).
> Should I post it to bugzilla ?
May be the best way to proceed.
Best regards,

-- 
--------------------------------------------------------------
[email protected] -- IUT (Nancy 2) -- INRIA Lorraine
http://SmartEiffel.loria.fr  --  The GNU Eiffel Compiler
POST: Loria, B.P. 239,54506 Vandoeuvre les Nancy Cedex, FRANCE
Voice:+33 0383913140 Mobile: +33 0665362381 Fax:+33 0383581701
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.