home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 33,086 of 33,346   
   Francis Glassborow to Thomas Richter   
   Re: compilers, endianness and padding   
   24 May 13 17:06:11   
   
   From: francis.glassborow@btinternet.com   
      
   On 24/05/2013 18:59, Thomas Richter wrote:   
   > On 23.05.2013 07:49, James K. Lowden wrote:   
   >>   
   >>> You already did. CORBA does solve the problem nicely. Probably   
   >>> "inverse" from the way you want it because you first have to write   
   >>> the IDL and not the C++ classes, but anyhow, it'll do.   
   >>   
   >> So say you.  I don't consider CORBA a "library solution" (setting aside   
   >> whether it's a solution at all, to anything).  CORBA is not a C++   
   >> library.  It's a foreign system with C++ bindings.   
   >   
   > So may it be - but does it matter? You need a solution, you got one.   
   > Why does C++ need to address this problem if there is a solution that   
   > works.   
   >   
      
   WG21 is usually very reluctant to introduce changes to the core unless   
   they solve wider problems. I suspect that reflection might help to solve   
   serialisation problems but it will also help in quite a few other ways   
   (or so I am told) So the serialisation problem might add motivation for   
   reflection.   
      
   However there is another issue. The problem is not just endian-ness. C++   
   specifies very little about fundamental types and that is a deliberate   
   design decision that has been around since the beginning (and has been   
   reconsidered and re-affirmed). If different implementations have   
   different widths for int how will serialisation help in transfer of int   
   data between programs even given a solution to the endian-ness?   
      
   Now rather than messing with the core of the language it would, I think,   
   be very helpful if implementers ensured that relevant meta-data was   
   retained in object files so that linkers could ensure that all TUs were   
   compatible (e.g. every object file should contain a header identifying   
   the settings of all compiler switches.   
      
   Please note that even extern "C" only works for compatible   
   implementations of C and C++   
      
   Regards   
   Francis   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca