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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.88.11 with SMTP id m11mr1567304iob.18.1510964427716; Fri, 17 Nov 2017 16:20:27 -0800 (PST) X-Received: by 10.157.95.5 with SMTP id f5mr157281oti.9.1510964427628; Fri, 17 Nov 2017 16:20:27 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!i6no1422315itb.0!news-out.google.com!x87ni1899ita.0!nntp.google.com!d140no1549413itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 17 Nov 2017 16:20:27 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7b3c7a72-0ea5-473a-94f4-7daa09e76603@googlegroups.com> Subject: Re: Choose between formal generic subprogram and subprogram access? From: Shark8 Injection-Date: Sat, 18 Nov 2017 00:20:27 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: feeder.eternal-september.org comp.lang.ada:48969 Date: 2017-11-17T16:20:27-08:00 List-Id: On Wednesday, November 8, 2017 at 6:24:17 AM UTC-7, Victor Porton wrote: > What are the good rules how to choose between formal generic subprogram v= s=20 > subprogram access argument/discriminant/field? My personal rule on the matter is always use a generic, except when constra= ints are that you might-encounter/must-handle the case wherein there is no = subprogram (the equivalent of null). I like generics and, in general, think that they offer a lot of nice option= s -- especially when they can be parametrized on values/subprograms/generic= -packages rather than as most popular languages have gone and just done typ= e-parametrizations (eg "Integer_List List" from Java, Delphi, C#, = etc).