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.101.77.65 with SMTP id j1mr6206180pgt.3.1498655758388; Wed, 28 Jun 2017 06:15:58 -0700 (PDT) X-Received: by 10.36.92.21 with SMTP id q21mr169615itb.6.1498655758320; Wed, 28 Jun 2017 06:15:58 -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!185no1891775itv.0!news-out.google.com!k7ni2316itk.0!nntp.google.com!x12no418018itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 28 Jun 2017 06:15:58 -0700 (PDT) In-Reply-To: <0f43638d-8954-4db2-94a3-b6615754da34@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.225.16.231; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 165.225.16.231 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> <71c4fdcd-4213-4b84-b852-c8674cfaf717@googlegroups.com> <0f43638d-8954-4db2-94a3-b6615754da34@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <32bd3d2d-16d2-46f4-902f-3b6944f30226@googlegroups.com> Subject: Re: Ada Annoyances From: Maciej Sobczak Injection-Date: Wed, 28 Jun 2017 13:15:58 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47158 Date: 2017-06-28T06:15:58-07:00 List-Id: > The following uses *functions* instead (which behave more like C++'s cons= tructors). No, C++ constructors have nothing to do with functions. They do not return = anything and in particular within the class hierarchy, where the constructi= on process has multiple stages and constructors operate on partial views on= the target object, it is clear that they have little analogies with regula= r functions. Still: > This program works correctly just like the C++ version. [...] I like your example. It demonstrates that factory functions are better suit= ed to implement the design intent that we have discussed. > (It seems that there is a bug in Gnat here. No language is perfect. :-) --=20 Maciej Sobczak * http://www.inspirel.com