comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic.nospam@acm.org>
Subject: Re: disjoint ranges ?
Date: 2000/10/13
Date: 2000-10-13T14:55:18+00:00	[thread overview]
Message-ID: <39E7225D.88A4906@acm.org> (raw)
In-Reply-To: 39E658A4.525AE881@acm.org

I have a similar experience. People *do* start to expect more capabilities
when they start seeing the various cool things they can do in Ada. A friend
of mine wanted to use enumerals to represent commands, but wanted to be able
to do something with correlating similar words to the same command. Some
version of wanting to interpret something like "Stop" "Quit" and "End" all
as the same thing. Of course there's no way to do that directly within a
single type or a subtype mechanism. One might resort to parallel types and
use 'Pos and 'Val to get you there or one might use groupings and ranges
(when Stop..End =>) to get you there, but there isn't some way of defining a
subtype with different enumerals for the same positions or some similar
mechanism.

Its a good example of how someone can see a feature in Ada and start
imagining even more powerful features resulting from it. Unfortunately, not
all imagined features are implementable.

MDC


Jeff Carter wrote:

> It's interesting how the useful things you can do easily with types and
> subtypes in Ada, and not at all or with difficulty in many (most?) other
> languages, lead people to expect even more from Ada's type system than
> it should reasonably be expected to do.

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






  parent reply	other threads:[~2000-10-13  0:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-12  0:00 disjoint ranges ? Philippe Torres
2000-10-12  0:00 ` Pat Rogers
2000-10-12  0:00   ` Ehud Lamm
2000-10-12  0:00     ` Pat Rogers
2000-10-13  0:00       ` Ehud Lamm
2000-10-13  0:34       ` Jeff Carter
2000-10-13  0:00         ` Philippe Torres
2000-10-14  3:12           ` Robert Dewar
2000-10-16  0:00             ` Robert A Duff
2000-10-16  0:00               ` Lao Xiao Hai
2000-10-17  0:00                 ` Robert A Duff
2000-10-17  0:00                   ` Lao Xiao Hai
2000-10-18  0:00                   ` dmitry6243
2000-10-18  0:00                 ` Robert Dewar
2000-10-18  0:00                   ` Robert A Duff
2000-10-19  3:08                     ` Overloading "in" (was: disjoint ranges ?) Jeff Carter
2000-10-19  0:00                       ` Ehud Lamm
2000-10-21  0:00                       ` Robert Dewar
2000-10-21  0:00                         ` Jeff Carter
2000-10-16  0:00               ` disjoint ranges ? Robert Dewar
2000-10-13  0:00         ` Marin David Condic [this message]
2000-10-14  3:14           ` Robert Dewar
2000-10-13  0:00     ` Philippe Torres
2000-10-13  0:00 ` wayne lydecker
2000-10-13  0:00   ` Lao Xiao Hai
2000-10-23  0:00     ` Charles Hixson
2000-10-24  0:00       ` dmitry6243
2000-10-13  0:00   ` wayne lydecker
2000-10-13  0:00 ` Lao Xiao Hai
2000-10-14  3:17   ` Robert Dewar
2000-10-16  0:00   ` Robert A Duff
2000-10-24  0:00 ` Andrew Cooke
replies disabled

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