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!.POSTED!not-for-mail From: "Alejandro R. Mosteo" Newsgroups: comp.lang.ada Subject: Redefining "in" "operator" Date: Mon, 5 Feb 2018 17:26:41 +0100 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 5 Feb 2018 16:26:41 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1c180c3577cf380db5e93e3b2e6e1d39"; logging-data="10164"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EQQn5V7Uog7B73Q0s3FAu" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Content-Language: en-US X-Mozilla-News-Host: news://news.eternal-september.org:119 Cancel-Lock: sha1:vkSQYMT2EY772XEO9tF9JbVu+AE= Xref: reader02.eternal-september.org comp.lang.ada:50305 Date: 2018-02-05T17:26:41+01:00 List-Id: It just dawned on me that I could want to define an "in" function for a couple of my types, but this is not allowed. I tried searching but the term is so general that I only find unrelated threads, so here it goes: 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. It's merely to avoid subversion of the default behavior? Couldn't it only be allowed for couples of types where it doesn't apply? Thanks, Álex.