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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Exceptions Date: Wed, 12 Dec 2007 09:37:20 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <475c6ed8$0$13111$9b4e6d93@newsspool2.arcor-online.net> <1kxk3hlfa25dw$.fl2wvbn0tpbg$.dlg@40tude.net> <475d296a$0$27813$4f793bc4@news.tdc.fi> <12mjar2f2t2e6$.o2upq0n29j1f.dlg@40tude.net> <475d99c6$0$3520$4f793bc4@news.tdc.fi> <1x0h6yxp9rhy1.1thonmo9cmwy3$.dlg@40tude.net> <475e8bde$0$27850$4f793bc4@news.tdc.fi> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1197470240 16745 192.74.137.71 (12 Dec 2007 14:37:20 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 12 Dec 2007 14:37:20 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:NWlwI2pPAPIwpD1ASBxZ3dSPauc= Xref: g2news1.google.com comp.lang.ada:18911 Date: 2007-12-12T09:37:20-05:00 List-Id: "Randy Brukardt" writes: > "Niklas Holsti" wrote in message > news:475e8bde$0$27850$4f793bc4@news.tdc.fi... > ... >> And perhaps also >> >> 5. Exceptions as formal generic parameters. > > Ada has this (although it isn't obvious): just pass an > Ada.Exceptions.Exception_Id to the generic. That is, given a generic spec > something like: > > generic > My_Exception : Ada.Exceptions.Exception_Id := > Constraint_Error'Identity; > package Gen is ... Yeah, you can do that. But IMHO this area of the language is a mess. Making exceptions be first-class objects would make the language simpler, easier to implement, and more powerful. - Bob