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=unavailable autolearn_force=no version=3.4.4 X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Mon, 14 Apr 2014 19:18:16 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1397521097 14492 69.95.181.76 (15 Apr 2014 00:18:17 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 15 Apr 2014 00:18:17 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 3281 Xref: number.nntp.dca.giganews.com comp.lang.ada:185738 Date: 2014-04-14T19:18:16-05:00 List-Id: We've (the ARG) already discussed this issue - see the e-mail of AI12-0086-1. Proper solutions are way too incompatible with existing code, and solutions that aren't incompatible are way too complex (involving allowing several possible ways to write the same thing, but still disallowing other cases so that we are still getting completeness checking). So this is only fixable with added syntax, but this problem is nowhere near important enough to add syntax (how common are nested variants?). Randy. "J Kimball" wrote in message news:lifq02$dap$1@loke.gir.dk... > On 03/25/2014 04:41 PM, Stoik wrote: >> I think that even a casual user of Ada should be able to influence >> somehow the new version of Ada. I wonder what is high on your list of >> wishes for Ada 202X? >> I suspect many of the proposals could be tested in GNAT before being >> introduced (or rejected) in the new version. One could add a switch to >> GNAT indicating that we want to use some of the experimental features. >> > > I found myself in a situation in which some syntactic sugar on Ada 2012 > might be able to help with. > > type T is ...; > > A : T; > > case A is > when X => null; > when Y | Z => > case A is > when Y => null; > when Z => null; > when X => null; -- Bleh > end case; > end case; > > I wish there was someway I wouldn't have to cover X for the inner case > like maybe the branches could be have variables with implicitly defined > subtypes. > > case A is > when X => null; > when B : Y | Z => > case B is > when Y => null; > when Z => null; > end case; > end case; > > A bit of exception choice syntax and an implicit subtype a la Ada 2012. > > B : Y | Z might translate to: subtype /anonymous/ is T with > Static_Predicate => T in Y | Z; B : /anonymous/; -- Predicate syntax might > be wrong. > > Is a minor thing, but would save me grumbling each time I do this.