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!news.eternal-september.org!news.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: T'Interface attribute Date: Fri, 4 Aug 2017 19:09:17 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Sat, 5 Aug 2017 00:09:18 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="15171"; 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; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:47595 Date: 2017-08-04T19:09:17-05:00 List-Id: "Eryndlia Mavourneen" wrote in message news:f647e80e-7171-47be-83f2-f68eb68cb2f2@googlegroups.com... On Wednesday, August 2, 2017 at 11:46:56 PM UTC-5, Randy Brukardt wrote: ... > P.P.S. I personally have never seen a real-world example where an > interface > actually helps. There's lots and lots of book examples and show examples > and > so on, but in practice you end up with only a single implementation so > there > really is nothing gained by involving a lot of dispatching calls. Ergo, > I'm > against anything (new) involving interfaces. YMMV. > >I use task interfaces in the case in which I have a basic task design that >has >certain core functionality and additionally may have any of a variety of >other >functionalities, too. At the point at which I am ready to consolidate the >interfaces into a specific kind of task, combining the interfaces, which >already >have declared the necessary entries (as procedures), becomes akin to >building >using Legos. This is the sort of thing that doesn't make a lot of sense to me. Interfaces are only useful if there are going to be multiple implementations of them. Otherwise, they just add unspeakable runtime overhead and you're getting nothing for them. Specifically, you have to be able to have useful routines made up of only dispatching calls. When I tried that in the Claw Builder, it turned into a maintenance nightmare - any significant change required a change to every specific type. And adding a new specific type took multiple days (there being so many routines to implement). It just doesn't fit with the agile-style programming that I do. >I find this kind of construction most pleasurable to design and implement. >It also >is easy to understand. Obviously, YMMV. Just don't expect me to push for anything involving interfaces. Randy.