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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!news.teledata-fn.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How come Ada isn't more popular? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Wed, 14 Feb 2007 11:12:47 +0100 Message-ID: NNTP-Posting-Date: 14 Feb 2007 11:12:48 CET NNTP-Posting-Host: 7904db6e.newsspool3.arcor-online.net X-Trace: DXC=?ZZ@ijEol?0nBOkdL^Lo7>McF=Q^Z^V384Fo<]lROoR1Fl8W>\BH3Y2ZY>mAW=4021DNcfSJ;bb[5FCTGGVUmh?4LK[5LiR>kg2[T5=541DC94 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:9314 Date: 2007-02-14T11:12:48+01:00 List-Id: On Mon, 12 Feb 2007 14:56:39 -0600, Randy Brukardt wrote: > Maciej Sobczak writes: >> Is a direct support for constructors a whiz-bang but inflexible package? >> In what way? > > Because there is no single concept of a constructor. Yes. There are constructors of the components, the constructors of the specific types inherited from, the constructor of the specific type and potentially the constructor of the class. > You need at a minimum a > copy-constructor and a default-constructor, Well, but there is nothing to do about it. For that matter Ada.Finalization too has Adjust and Initialize. The difference between creating a copy and creating a new thing cannot be eliminated by any abstraction. They are semantically different. What constructor offer is a sane way to express initialization, by-value parameter passing and assignment. BTW, I fully agree that there is no need to introduce constructors as a special language object. It would be sufficient to declare their existence and to allow definition some of parts of through user-defined primitive and class-wide operations. It is just so that we need a little more language support than Ada.Finalization can offer, and, for all, it must be available for all types without exceptions. > Ada chose to decompose these things into their > constituent parts. Which was obviously impossible. For example, the assignment problem. Is it a function or a procedure? How the constraints of the left side are influenced by the right side? etc. > Yes, Ada does have a problem with composition, but that is a general > language problem, not one that is specific to constructors or any other > specific feature. Yes! > It would be much better to fix that composition problem > generally rather than to bolt on more special features that do compose, > while still leaving the general case unfixed. Certainly. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de