From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:5c41:: with SMTP id j1mr12271356qtj.158.1611788649387; Wed, 27 Jan 2021 15:04:09 -0800 (PST) X-Received: by 2002:a25:5f02:: with SMTP id t2mr19235155ybb.161.1611788649256; Wed, 27 Jan 2021 15:04:09 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 27 Jan 2021 15:04:09 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <06b29a4d-fc81-4062-958c-f6b8d4ef240cn@googlegroups.com> Subject: Re: Simple example on interfaces From: Shark8 Injection-Date: Wed, 27 Jan 2021 23:04:09 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61225 List-Id: On Tuesday, January 26, 2021 at 8:36:56 PM UTC-7, Randy Brukardt wrote: >=20 > Ultimately, I think one should only use interfaces IFF there is a clear= =20 > reuse case where the substantial cost of dispatching is not a concern. Fo= r=20 > me, that is approximately never, but of course your mileage may vary.=20 It makes sense to use them in the internals of the compiler. Perhaps not a = single-language compiler, but certainly a multilanguage one like GCC. An ar= gument could be made for a single-language compiler in an environment like = described in the DIANA reference-manual's rationale, where the DIANA-struct= ure was meant to be passed around to things like pretty-printers and static= -analyzers and code-generators. You could make an argument that it would be useful for code-generators, too= . I was contemplating using something like a hybrid of IEEE694 and 3AC last y= ear... but that's a bit of a tangent. https://standards.ieee.org/standard/694-1985.html 3AC =3D Three Address Code