Re: Numerics

Peter Gummer <[email protected]>
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
On 25/03/2005, at 8:03 PM, Colnet Dominique wrote:
> The fact is that the compiler allow you to check statically that
> some value fit into some type without any possible lost of information.
> It is not possible to achieve that with the conversion mechanism (it 
> would not be statically checked).

Forgive me if I'm misinterpreting you, Dominique, but are you saying 
that the draft ECMA approach involves conversion?

This is not so. See ETL3, section 29.3 "Forcing a Type on a Constant". 
Page 680 says, "Do not confuse this Manifest_type notation {T} const, 
for a constant const, with the mechanism for expressing conversions 
explicitly: {T} [exp] ..."

The ECMA mechanism is not a conversion mechanism. Unless I'm mistaken, 
it can be statically checked.

- Peter Gummer
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.