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: g2news1.google.com!postnews.google.com!o21g2000prn.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Wed, 9 Feb 2011 20:30:57 -0800 (PST) Organization: http://groups.google.com Message-ID: <47adc19e-7623-4d9b-a027-2e35ef64defa@o21g2000prn.googlegroups.com> References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <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> <7ee1e395-a885-4f86-a3ed-30f773b67803@y12g2000prf.googlegroups.com> 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 1297312257 32115 127.0.0.1 (10 Feb 2011 04:30:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Feb 2011 04:30:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o21g2000prn.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: g2news1.google.com comp.lang.ada:17208 Date: 2011-02-09T20:30:57-08:00 List-Id: On Feb 9, 7:51=A0pm, "Randy Brukardt" wrote: > "Shark8" wrote in message > > news:7ee1e395-a885-4f86-a3ed-30f773b67803@y12g2000prf.googlegroups.com... > On Feb 8, 5:03 pm, "Randy Brukardt" wrote: > ... > > > > >> Lest you think I'm talking about mythical other people, let me say tha= t I > >> put Janus/Ada (written almost solely in Ada) in the category of garbag= e > >> Ada > >> programs. It was designed by people (including me, fresh out of colleg= e) > >> that didn't understand encapsulation and contracts very well, and as s= uch > >> it > >> doesn't use them very consistently. It "works", of course, but it suff= ers > >> from a lot of the problems that you might get from a C written compile= r. > >> 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. > > >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? > > The last part is easy, yes, of course. Nothing better has appeared, and I > don't think some one-off language would be a good choice. > > The main thing to redo would be to organize the units and interfaces in s= ome > logical way. We had to work around various arbitrary constraints in the > early days -- to get the compiler to fit at all on CP/M systems and 16-bi= t > MS-DOS systems. That's led to a forest of packages with poorly defined > interfaces (because putting everything related in one package would have > been too large for what was compilable on MS-DOS). Moreover, people alway= s > "cheat" for expediency -- they directly call supposely internal routines > because they can. (Ada 83 didn't have anything like private packages; we > used subunits when we could, but they were only effective for large > subprograms.) Getting rid of that would be good. Finally, there is a lot = of > duplicated algorithms, mainly because we couldn't spare the space to stor= e > little used values. I definitely see how that (private packages) could help. This may be a dumb question but could those duplicated algorithms have been into a single generic procedures / functions and then instantiated where needed? > >Also, in your opinion what's the best thing to do to really understand > >encapsulation and contracts? > > I'm not sure. I didn't really figure it out until I had been burned enoug= h > by bad ones. :-) And we had experience using a "modular" language at the > University of Wisconsin (the original Modula), so we already had a vague > idea of what benefits it could bring. I see.I get the same feeling [vague idea of benefits] when I think how an OS with a mind to strong-typing, that logical organization of units, and a very object (and stream) oriented would be different n-nature than virtually all consumer level OSes. If you're hiring for a rewrite, I'd be especially interested. Actually, I would really love to get in on an Ada shop if possible, so if you are hiring at all I'm interested.