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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Redefining "in" "operator" Date: Mon, 5 Feb 2018 18:48:24 -0600 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Tue, 6 Feb 2018 00:48:24 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="14354"; mail-complaints-to="news@jacob-sparre.dk" 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.7246 Xref: reader02.eternal-september.org comp.lang.ada:50312 Date: 2018-02-05T18:48:24-06:00 List-Id: "Jeffrey R. Carter" wrote in message news:p5a1bq$f3v$1@dont-email.me... > On 02/05/2018 05:26 PM, Alejandro R. Mosteo wrote: >> >> Are there special reasons not to allow something like that? I think "in" >> is not an operator in the Ada RM sense but now I'm curious why the >> special treatment. > > The right side of "[not] in" is a subtype. Ada does not allow operators to > have operands that are subtypes. Well, Ada 2012 also allows it to be a (set) of expressions as well. But your basic point applies: there aren't any function parameters that are subtypes or that are sets of expressions. One could imagine allowing a pair of expressions, but that's just "=" (and "in" in fact uses user-defined "=" when necessary). Randy.