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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5ae752c88e0dde5e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!news.osn.de!diablo2.news.osn.de!news.belwue.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Using representation clauses in networking software Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8739ugqfeb.fsf@mid.deneb.enyo.de> <43fkp7an4c5m$.3db3n6adym42.dlg@40tude.net> <8739ugkka6.fsf@mid.deneb.enyo.de> <1pjh30gv98n9t$.lycfvhr1l9rz$.dlg@40tude.net> <87tymvhoy5.fsf@mid.deneb.enyo.de> Date: Sun, 15 Aug 2010 18:10:08 +0200 Message-ID: <1x3jdyxqnl1e7.xlqx0giurt0x.dlg@40tude.net> NNTP-Posting-Date: 15 Aug 2010 18:10:06 CEST NNTP-Posting-Host: 0cf9d80c.newsspool3.arcor-online.net X-Trace: DXC=FJA;LfOIR]VI?44J>Z[:RQMcF=Q^Z^V3X4Fo<]lROoRQ8kF9]lGo\PlA4VNX X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:13346 Date: 2010-08-15T18:10:06+02:00 List-Id: On Sun, 15 Aug 2010 17:32:02 +0200, Florian Weimer wrote: > It's quite difficult to come up with the best approach to > deserialization for a particular architecture. There are some pretty > common CPUs that handle unaligned loads quite well, so it's unclear > that the load-a-byte-at-a-time-and-shift approach is a win. Same for > serialization. Usually there are next 2-4 protocol levels, so anything you might gain at this level will be lost anyway if you tried to keep things encoded. Worse than that, some of the layers may explicitly state endiannes at run time. (I know at least two examples of such protocols) Dynamic representation clauses, shudder? > So why were representation clauses added to Ada in the first place? I think they were due to dominance of dual-ported memory and non-standardized hardware that time. > Would it make sense to deprecate them? Maybe, especially because they do not allow writing portable programs anyway. Under portability I understand that the hardware is fixed and the target machine varies. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de