comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Using representation clauses in networking software
Date: Sun, 15 Aug 2010 18:10:08 +0200
Date: 2010-08-15T18:10:06+02:00	[thread overview]
Message-ID: <1x3jdyxqnl1e7.xlqx0giurt0x.dlg@40tude.net> (raw)
In-Reply-To: 87tymvhoy5.fsf@mid.deneb.enyo.de

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



  reply	other threads:[~2010-08-15 16:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-15 11:33 Using representation clauses in networking software Florian Weimer
2010-08-15 13:44 ` Yannick Duchêne (Hibou57)
2010-08-15 14:32   ` Dmitry A. Kazakov
2010-08-15 14:44     ` Florian Weimer
2010-08-15 15:04       ` Dmitry A. Kazakov
2010-08-15 15:32         ` Florian Weimer
2010-08-15 16:10           ` Dmitry A. Kazakov [this message]
2010-08-15 16:40             ` Yannick Duchêne (Hibou57)
2010-08-15 17:58               ` Dmitry A. Kazakov
2010-08-15 19:11                 ` Shark8
2010-08-15 19:15                 ` Simon Wright
2010-08-15 20:25                   ` Maciej Sobczak
2010-08-15 21:24                     ` Simon Wright
2010-08-16  6:40                     ` Dmitry A. Kazakov
2010-09-04 20:46                     ` Florian Weimer
2010-08-15 15:39         ` Yannick Duchêne (Hibou57)
2010-08-15 15:31       ` Yannick Duchêne (Hibou57)
2010-08-15 15:30     ` Yannick Duchêne (Hibou57)
2010-08-15 16:10       ` Dmitry A. Kazakov
2010-08-16 10:57     ` Stephen Leake
2010-08-15 15:58 ` Simon Wright
2010-08-15 16:03   ` Florian Weimer
2010-08-17  3:32     ` Randy Brukardt
2010-08-16  9:12 ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox