comp.lang.ada
 help / color / mirror / Atom feed
From: Wojtek Narczynski <wojtek@power.com.pl>
Subject: Re: Enumeration representation enhancement proposal
Date: Fri, 15 Oct 2004 13:06:42 +0200
Date: 2004-10-15T13:06:42+02:00	[thread overview]
Message-ID: <pan.2004.10.15.11.06.42.353885@power.com.pl> (raw)
In-Reply-To: 2t7sd8F1rsqh9U1@uni-berlin.de

>> Maybe this could be improved in Ada 2005? For example:
>> 
>> type Mix_Code is (Red, Green, Blue, Grey);
>> 
>> --  Modest proposal
>> 
>> for Mix_Code use (Red => 1, Green => 2, Blue => 3, Grey => others);
>> 
>> This should be relatively straightforward to implement, and would cover
>> most needs.
> 
> The problem with this proposal it that (actual) values of the type would
> no longer satisfy the ordering criteria (that a machine < or > test will
> always have the same result as the corresponding canonical test).

I don't follow, could you provide a sample Ada code which would be
problematic?

Regards,
Wojtek



  reply	other threads:[~2004-10-15 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14  9:31 Enumeration representation enhancement proposal Wojtek Narczynski
2004-10-14 17:47 ` Nick Roberts
2004-10-15 11:06   ` Wojtek Narczynski [this message]
2004-10-19 14:55     ` Jacob Sparre Andersen
2004-10-20  8:41       ` Wojtek Narczynski
2004-10-20  8:58         ` Jacob Sparre Andersen
2004-10-20 11:04           ` Wojtek Narczynski
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox