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!feeder.eternal-september.org!gandalf.srv.welterde.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: Extending a third party tagged type while adding finalization Date: Tue, 5 Dec 2017 15:09:29 -0600 Organization: JSA Research & Innovation Message-ID: References: <4db43571-7f86-4e73-8849-c41160927703@googlegroups.com> <6496a10f-c97e-4e42-b295-2478ad464b2f@googlegroups.com> <6106dfe6-c614-4fc1-aace-74bf8d7435e3@googlegroups.com> <24767ee5-cda8-45e4-98d1-7da44757bd40@googlegroups.com> <037e7f02-9149-4648-b7c5-91f67c1c1961@googlegroups.com> Injection-Date: Tue, 5 Dec 2017 21:09:30 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="3094"; 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; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:49389 Date: 2017-12-05T15:09:29-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:p04d5g$6jd$1@gioia.aioe.org... > On 2017-12-04 21:54, Randy Brukardt wrote: > >> The sort things that can't afford to be controlled are those that aren't >> really ADTs anyway (think coordinates of a windows). > > What? Window coordinates are a perfect example of ADT. There are lots of > quite specific operations defined on coordinates which are beyond normal > arithmetic: scaling, rotation, moving, relative to absolute conversions, > logical to physical conversions, coordinate systems, scalar and vector > products, coordinate translation ... the list is almost infinite. ADT = "abstract data type". And there is nothing "abstract" about coordinates, where you usually want to use an aggregate of X and Y values to create them. Just because the type isn't private doesn't mean that you can't have operations on them (Janus/Ada internally has essentially no private types, but there sure are a lot of operations :-). The sorts of things that one doesn't want to make controlled also tend to be the sorts of things that one doesn't want to make private. Ergo, my advice above. As always, YMMV. Randy.