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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!y12g2000prf.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Tue, 8 Feb 2011 16:14:57 -0800 (PST) Organization: http://groups.google.com Message-ID: <7ee1e395-a885-4f86-a3ed-30f773b67803@y12g2000prf.googlegroups.com> References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <4d4ff70e$0$6886$9b4e6d93@newsspool2.arcor-online.net> <737a6396-72bd-4a1e-8895-7d50f287960e@d28g2000yqc.googlegroups.com> <4d5008a5$0$6879$9b4e6d93@newsspool2.arcor-online.net> <4d5031fe$0$6765$9b4e6d93@newsspool3.arcor-online.net> <1f229967-d3cf-42b6-8087-c97ee08652f3@i40g2000yqh.googlegroups.com> <4d51169e$0$7657$9b4e6d93@newsspool1.arcor-online.net> <4d51905c$0$19486$882e7ee2@usenet-news.net> <36212a7b-deab-45d9-ac45-aa29cd90c7bc@o18g2000prh.googlegroups.com> <4d51a7bb$0$19486$882e7ee2@usenet-news.net> NNTP-Posting-Host: 174.28.151.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1297210497 24768 127.0.0.1 (9 Feb 2011 00:14:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Feb 2011 00:14:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y12g2000prf.googlegroups.com; posting-host=174.28.151.164; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18037 Date: 2011-02-08T16:14:57-08:00 List-Id: On Feb 8, 5:03=A0pm, "Randy Brukardt" wrote: > "Hyman Rosen" wrote in message > > news:4d51a7bb$0$19486$882e7ee2@usenet-news.net... > > > On 2/8/2011 3:11 PM, Shark8 wrote: > >> No, that's not it. What is 'it' is that the C programmers =A0treated > > > Ada as if it were C and the result was, as expected, bad Ada. > > > It is my understanding that Ada proponents believe that > > using Ada results in better programs than using C. But > > when presented with a program written in Ada that is not > > demonstrably better, that program is removed from the set > > of Ada programs under consideration by virtue of having > > been written by "C people". That is precisely the "no true > > Scotsman" fallacy. > > No fallacy here. 99% of programs (in any programming language) are garbag= e. > The 1% that are not garbage are written in a language that supports and > enforces real contracts. C is not such a language, ergo all of its progra= ms > are garbage (it might be possible to write some simple functions that are= n't > garbage, but nothing complex). Ada is only *barely* such a language, so m= ost > Ada programs are garbage as well. Garbage programs might work after lots = of > testing, but they're not engineered in any way. > > Lest you think I'm talking about mythical other people, let me say that I > put Janus/Ada (written almost solely in Ada) in the category of garbage A= da > programs. It was designed by people (including me, fresh out of college) > that didn't understand encapsulation and contracts very well, and as such= it > doesn't use them very consistently. It "works", of course, but it suffers > from a lot of the problems that you might get from a C written compiler. > With one exception: virtually every problem is detected by the failure of= an > Ada runtime check, so it is rare to get the wrong answer as opposed to no > answer. > > I would in fact argue that Ada is not good enough here; we need more > contracts than even Ada 2012 can provide. Or we can continue to assume th= at > crap is good enough. The world, sadly, is pretty much convinced that is a= ll > we can do. It surely is with the programming languages in wide use. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Randy= . Intriguing self-assessment on Janus/Ada. If you don't mind my asking, if you were to scrap-redo the compiler what would you do differently? Assuming you'd be using Ada, would you implement it in Ada 2012? Also, in your opinion what's the best thing to do to really understand encapsulation and contracts?