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=ham 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!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? Date: Fri, 09 Feb 2007 07:50:43 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1169636785.504223.139630@j27g2000cwj.googlegroups.com> <45b8361a_5@news.bluewin.ch> <3pejpgfbki.fsf@hod.lan.m-e-leypold.de> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1171025444 8696 192.74.137.71 (9 Feb 2007 12:50:44 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 9 Feb 2007 12:50:44 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:De6g7lL3i0UOLH9DziyMsrQ0vo0= Xref: g2news2.google.com comp.lang.ada:9180 Date: 2007-02-09T07:50:43-05:00 List-Id: Maciej Sobczak writes: > The ideal solution is called "constructor", everything else is just > patchwork. Returning limited types is a compromise that can be > satisfying in most cases - that's why it's good that Ada 2005 provides > at least this feature. I presume by "constructor", you mean the C++ style feature, right? Why is that superior to just using functions as constructors? Ada has: type T(<>) is ... to indicate that clients MUST call some constructor function when creating objects. And it now allows constructor functions (and aggregates) for limited types. I'm talking about Ada 2005, of course. I agree that limited types were rather painful in Ada 95. - Bob