From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8276b2994037cd71 X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: disjoint ranges ? Date: 2000/10/13 Message-ID: <39E7225D.88A4906@acm.org>#1/1 X-Deja-AN: 681024044 Content-Transfer-Encoding: 7bit References: <39E612C9.9BF98CD3@laas.fr> <8s59nu$ej4$1@news.huji.ac.il> <39E658A4.525AE881@acm.org> X-Accept-Language: en X-Server-Date: 13 Oct 2000 14:55:18 GMT Content-Type: text/plain; charset=us-ascii Organization: Quadrus Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-10-13T14:55:18+00:00 List-Id: 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 ======================================================================