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.13.232.3 with SMTP id r3mr10898732ywe.55.1498423827089; Sun, 25 Jun 2017 13:50:27 -0700 (PDT) X-Received: by 10.157.46.132 with SMTP id w4mr423557ota.18.1498423827050; Sun, 25 Jun 2017 13:50:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!m54no721506qtb.1!news-out.google.com!k7ni2445itk.0!nntp.google.com!f20no1197832itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 25 Jun 2017 13:50:26 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.108.152.51; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 213.108.152.51 References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> <1498048151.20885.28.camel@obry.net> <96174ea5-852d-44e9-8535-7c1eb24d5326@googlegroups.com> <8d3aff06-82df-485f-89e5-a50c326aab05@googlegroups.com> <66aa262e-2ac9-4016-b32d-e9fee14779e1@googlegroups.com> <88e2f18a-0786-4303-a5b8-fe82e8c81dcb@googlegroups.com> <4ad48635-aa1e-45bf-8693-1f77d5fee490@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada Annoyances From: Maciej Sobczak Injection-Date: Sun, 25 Jun 2017 20:50:27 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47113 Date: 2017-06-25T13:50:26-07:00 List-Id: > It is frequently used design pattern to leave some parts of construction= =20 > used by the parent type to the children. I have never heard the name of this "design pattern", but if I understand t= he description correctly, I can do that in C++. So there is no need for any= thing more evolved. > The point is that construction=20 > requires both early (type-specific) and late (class-wide) initializers. The example I have shown demonstrates this. > [...] > > Most importantly, useObject does not know that it gets called from > > constructors, because it might be called from any other context as well= . > > It might be even in a different translation unit. > >=20 > > This shows that dispatching is *not* "killed" and whatever > > environment heating takes place, >=20 > I don't see how it shows that, or anything. The useObject function performs a dispatching call and it does so even if t= he function itself is called in the middle of some object construction. So,= the dispatching is not "killed" while the object is being constructed. It = still works properly, with the type-safe range of dispatch. > The only right thing [...] For me the only right thing is type safety. If it is compromised, like in A= da, then the language got it wrong. > Everything else in=20 > the C++ construction model is wrong. C++ has stronger type safety than Ada in this particular context. I'm fine = with it. If it's wrong for you, let's agree to disagree. --=20 Maciej Sobczak * http://www.inspirel.com