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,d778a4f52acd9d43 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.145.80 with SMTP id c16mr484352bkv.2.1324569692459; Thu, 22 Dec 2011 08:01:32 -0800 (PST) Path: jh9ni41342bkb.0!nntp.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!aqua.octanews.net!indigo.octanews.net!news-out.octanews.net!mauve.octanews.net!feed.news.qwest.net!mpls-nntp-03.inet.qwest.net!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: Representation clauses for base-64 encoding Date: Thu, 22 Dec 2011 16:00:15 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <4ef31672$0$6574$9b4e6d93@newsspool3.arcor-online.net> <9lgls6FticU1@mid.individual.net> <4ef34839$0$7623$9b4e6d93@newsspool1.arcor-online.net> Mime-Version: 1.0 Injection-Date: Thu, 22 Dec 2011 16:00:15 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="7fyd7lCvGVUn5eibBXudkw"; logging-data="3402"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/mEPnryjFfjBRzmXlu39d" User-Agent: slrn/0.9.9p1 (FreeBSD) Cancel-Lock: sha1:+UHBrzoS1wHkjfotPPfiaexkj0M= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: 2011-12-22T16:00:15+00:00 List-Id: Hello, On 2011-12-22, Georg Bauhaus wrote: > On 22.12.11 13:24, Niklas Holsti wrote: > >> This defines a nice Ada representation of the six-bit codes. But this >> was not Natasha's question; > > You are quite right, sorry. > > Stubbornly, I'd like to mumble, though, that the very > notion of representation is at odds with portability. However here representation is not used as a notion, only as a tool: using explicit shifts and masks, it is possible to write portable Ada that performs the correct split of 3 octets on any platform. The previous argument was that representation clauses allow more readable code, which I'm inclined to believe. But is it really necessary to give up portability for the sake of readability? (I would answer "no" in that particular case, since base-64 splitting is such a very simple and well-known operation) Natasha