comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Should representation clauses be complete for each bit?
Date: Wed, 20 Jul 2011 18:24:25 +0200
Date: 2011-07-20T18:24:25+02:00	[thread overview]
Message-ID: <epmcw6nwijga.16dk56llx52ll$.dlg@40tude.net> (raw)
In-Reply-To: 17c212b1-d0a6-498a-a381-71188a67ec65@a10g2000yqn.googlegroups.com

On Wed, 20 Jul 2011 08:29:18 -0700 (PDT), okellogg wrote:

> My use case originates from a bit packed communication protocol where
> the standard requires spare bits interspersed among the useful data.

My advise would be not to use representation clauses. They cannot deal with
protocols anyway. Think about protocol error handling, special patterns of
bits, checksums etc. It also makes no sense in letting the wire-specific
types to spoil the rest of your code with unchecked unions, nonnative
scalars, misaligned data, nul-terminated rubbish etc. Any performance gain
compared to explicit parsing would be negligible and may turn to a loss
later when the data are used.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2011-07-20 16:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 10:34 Should representation clauses be complete for each bit? okellogg
2011-07-20 14:51 ` Robert A Duff
2011-07-20 15:24   ` Georg Bauhaus
2011-07-20 17:28     ` Robert A Duff
2011-07-21  7:37       ` Martin
2011-07-21  8:22         ` Simon Wright
2011-07-21 14:58           ` Robert A Duff
2011-07-23  0:13             ` Randy Brukardt
2011-07-27 14:12               ` okellogg
2011-07-28  0:03                 ` Randy Brukardt
2011-07-21  9:43         ` Georg Bauhaus
2011-07-21 15:06           ` Robert A Duff
2011-07-31 15:02             ` BrianG
2011-07-21 21:11           ` Brian Drummond
2011-07-21  7:59     ` Stephen Leake
2011-07-20 15:29   ` okellogg
2011-07-20 16:24     ` Dmitry A. Kazakov [this message]
2011-07-20 16:58       ` okellogg
2011-07-20 19:38         ` Dmitry A. Kazakov
2011-07-20 17:27     ` Robert A Duff
2011-07-20 19:14       ` okellogg
2011-07-20 20:13         ` J-P. Rosen
2011-07-20 21:23           ` Robert A Duff
2011-07-20 21:21         ` Robert A Duff
2011-07-21  8:02         ` Stephen Leake
2011-07-21  8:00     ` Stephen Leake
2011-07-21  7:36   ` Martin
2011-07-22 23:50   ` Randy Brukardt
2011-07-23  2:16     ` tmoran
2011-07-23 15:12     ` Robert A Duff
2011-07-26 21:10       ` Randy Brukardt
2011-07-23  0:01   ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
1998-04-17  0:00 Should Representation Clauses " Marin David Condic, 561.796.8997, M/S 731-96
     [not found] <3533C3C5.3F25CB91@cacd.rockwell.com>
1998-04-16  0:00 ` Stephen Leake
replies disabled

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