comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Choose between formal generic subprogram and subprogram access?
Date: Fri, 17 Nov 2017 16:20:27 -0800 (PST)
Date: 2017-11-17T16:20:27-08:00	[thread overview]
Message-ID: <7b3c7a72-0ea5-473a-94f4-7daa09e76603@googlegroups.com> (raw)
In-Reply-To: <otv0hu$83i$1@gioia.aioe.org>

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 vs 
> subprogram access argument/discriminant/field?

My personal rule on the matter is always use a generic, except when constraints 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 options -- especially when they can be parametrized on values/subprograms/generic-packages rather than as most popular languages have gone and just done type-parametrizations (eg "Integer_List List<Integer>" from Java, Delphi, C#, etc).


      parent reply	other threads:[~2017-11-18  0:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <otv0hu$83i$1@gioia.aioe.org>
2017-11-10  8:59 ` Choose between formal generic subprogram and subprogram access? gautier_niouzes
2017-11-15 23:29 ` Robert Eachus
2017-11-18  0:20 ` Shark8 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox