>>>>> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
  LW> =head1 Compact structs

  LW> A class whose attributes are all low-level types can behave as
  LW> a struct.  (Access from outside the class is still only through
  LW> accessors, though.)  Whether such a class is actually stored compactly
  LW> is up to the implementation, but it ought to behave that way,
  LW> at least to the extent that it's trivially easy (from the user's
  LW> perspective) to read and write to the equivalent C structure.
  LW> That is, when byte-stringified, it should look like the C struct,
  LW> even if that's not how it's actually represented inside the class.
  LW> (This is to be construed as a substitute for at least some of the
  LW> current uses of C<pack>/C<unpack>.)

and vec. hard to get pack/unpack to access single bits with offsets or
classic c bit fields.

from inside the class (no accessor needed) will bit sized attributes be
direct access to the field (ala c)? that would mean you could use a
class to map to complex structures and in particular to i/o registers
and not have to jump through shift/mask hoops.

<the rest of S9 hurt my brane>

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to