🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #251

Re: "packed" objects

#251
From: hopper
Date: Thu, 02 Aug 1990 23:23
32 lines
2432 bytes
In article <1990Aug1.171148.22119@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
>>	B) Certain C++ languages (Lattice C++ for the Amiga for one) make
>>	extensive use of C++ structures/classes to hide the cruft of working
>>	with the system libraries.  Surely a desireable end.  However, the
>>	system libraries depend on a specific order of elements within a
>>	structure and would likely break under either of the above.
>
>This just means that there have to be enough guarantees on behavior that
>the library code can assume a stable base.  This is much the same as what
>would be needed to make inheritance work anyway, so I don't see a problem
>there in general.

	One of the nicer things in C, (and C++) is to be able to create
machine specific data sructures that correspond to some area in memory.
(i.e. bit-fields and such). I agree that writing machine specific code is
generally undesirable, sometimes it is necessary.

	Currently the methods of structure member ordering, and packing
specifications are easy enough to figure out that you can easily write a
structure that models some hardware/OS data structure rather well. If
packing of bit-fields, and structure members became a standard, unavoidable
thing, this would no longer be easy to do. In other words, you would no
longer be able to write an OS in C++.

Have fun,
UUCP: rutgers!umn-cs!ux.acs.umn.edu!hopper   (Eric Hopper)
     __                    /)                       /**********************/
    / ')                  //                         * I went insane to   *
   /  / ______  ____  o  //  __.  __  o ____. . _    * preserve my sanity *
  (__/ / / / <_/ / <_<__//__(_/|_/ (_<_(_) (_/_/_)_  * for later.         *
Internet:              />                            * -- Ford Prefect    *
hopper@ux.acs.umn.edu </  #include <disclaimer.h>   /**********************/
Technical Details
Message-ID: <1944@ux.acs.umn.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!rex!samsung!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!ux.acs!hopper
References: <56159@microsoft.UUCP> <56165@microsoft.UUCP> <6785@netxcom.DHL.COM> <1990Aug1.171148.22119@zoo.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!rex!samsung!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!ux.acs!hopper
From: hopper@ux.acs.umn.edu (hopper)
Newsgroups: comp.std.c++
Subject: Re: "packed" objects
Message-ID: <1944@ux.acs.umn.edu>
Date: 2 Aug 90 23:23:53 GMT
References: <56159@microsoft.UUCP> <56165@microsoft.UUCP> <6785@netxcom.DHL.COM> <1990Aug1.171148.22119@zoo.toronto.edu>
Reply-To: hopper@ux.acs.umn.edu (Eric Hopper)
Organization: Omnifarious Software
Lines: 32