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,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: why learn C? Date: Mon, 2 Apr 2007 18:54:35 -0500 Organization: Jacob's private Usenet server Message-ID: References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com> <1172161751.573558.24140@h3g2000cwc.googlegroups.com> <546qkhF1tr7dtU1@mid.individual.net> <5ZULh.48$YL5.40@newssvr29.news.prodigy.net> <1175215906.645110.217810@e65g2000hsc.googlegroups.com> <1175230352.808212.15550@e65g2000hsc.googlegroups.com> <1175236212.771445.135460@y66g2000hsf.googlegroups.com> <1175308871.266257.77460@e65g2000hsc.googlegroups.com> <1175501602.127760.186120@q75g2000hsh.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1175557982 1168 69.95.181.76 (2 Apr 2007 23:53:02 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 2 Apr 2007 23:53:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:14751 Date: 2007-04-02T18:54:35-05:00 List-Id: "kevin cline" wrote in message news:1175501602.127760.186120@q75g2000hsh.googlegroups.com... > On Mar 30, 9:41 pm, "jimmaureenrog...@worldnet.att.net" For instance: ... > > > Ada does not provide a direct equivalent to C++ constructors > > and destructors. While this may seem a problem to a C++ or > > Java programmer, > > It's a huge problem when a class needs initialization. Then you have > to mess around with controlled types. You have that backwards: there is (almost) no reason for a tagged type to not be controlled in Ada. All new types should be declared that way, unless there is a compelling reason why the (tiny) space and time overhead matters. I don't believe that there are many (if any) such types. But if there are such types, how do you write a C++ class for them that doesn't have that overhead? > > it does have the virtue of not providing > > an avenue for the error handled by this rule. > > No, instead you get to deal with the problem of having objects that > have been created but require further initialization before use. Or > else you have to create a controlled type, which is just complex > enough that most Ada programmers probably don't quite understand it, > so mostly it doesn't get done. Are these "most Ada programmers" the same as the "most C++ programmers" that you claim don't matter? You're only willing to talk about "expert C++ programmers", so I think it is only fair that we only talk about "expert Ada programmers". And no one that doesn't understand at least the basics of controlled types (which are nearly trivial) could possibly be called an Ada expert. Randy.