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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a1ce307c10055549 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-18 07:19:09 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!ihug.co.nz!newshosting.com!news-xfer1.atl.newshosting.com!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: calenday (was Re: IBM Acquires Rational Ada User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Wed, 18 Dec 2002 15:17:49 GMT Content-Type: text/plain; charset=us-ascii References: <3DF1615C.7AAAC86E@adaworks.com> <8db3d6c8.0212091445.12594821@posting.google.com> <3DF628C4.7090607@cogeco.ca> <3DF6653D.3030603@cogeco.ca> <8db3d6c8.0212101850.51506572@posting.google.com> <3DF8D33F.9020205@cogeco.ca> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:32023 Date: 2002-12-18T15:17:49+00:00 List-Id: "Marin David Condic" writes: > Robert A Duff wrote in message > news:wccn0n4oazy.fsf@shell01.TheWorld.com... > > "Warren W. Gay VE3WWG" writes: > > > > >... It is also apparently bad > > > practice to rely on the representation, because I get the > > > impression that some Ada compilers may ignore the representation > > > clause. > > > > Ada compilers cannot ignore rep clauses. > > > > They may not be allowed to ignore them, but they sure can refuse to obey > them. Is there a practical difference between: "I can't hear you. > LaLaLaLaLa..." and "Yeah. Right. When hell freezes over!" Either way, I > don't get what I wanted. Yes, there is a practical difference. In particular, it means that Warren W. Gay's "bad practice to rely on the representation" comment above is wrong. You *can* rely on rep clauses, in the sense that if your compiler doesn't complain, it must obey the rep clause. Furthermore, there is a fairly substantial subset of rep clauses that must be supported by all compilers. For example, the suggestion of rep-clausing the Day_Name_Type should be completely portable. (But I still think it's not a good idea.) On the other hand, I agree with your rants about the non-portability of rep clauses. If I were designing a language from scratch, I would try to nail down the rules for rep clauses so that all compilers support exactly the same ones. Or, at least, all compilers for the same machine (where "same machine" can be interpreted to mean that the various values in System, such as Storage_Unit and Word_Size are the same). I think I would also require fairly "complete" support, in the sense of requiring "weird" bit fields that are extremely inefficient to access. As you say, it's very frustrating to use rep clauses for 90% of the cases, and then be forced to use a completely different mechanism when you run across "weird" hardware you need to interface to. - Bob