home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 15918 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.6 KB

  1. Xref: sparky comp.lang.c++:15918 comp.std.c++:1513
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  4. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  5. Subject: Re: PROPOSAL: Hidden private parts of classes
  6. Message-ID: <1992Nov7.155248.23401@ucc.su.OZ.AU>
  7. Sender: news@ucc.su.OZ.AU
  8. Nntp-Posting-Host: extro.ucc.su.oz.au
  9. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  10. References: <1992Oct30.113234.15010@daimi.aau.dk> <1csnjaINNqa0@hpsdlss3.sdd.hp.com> <klamer.720538594@mi.el.utwente.nl>
  11. Date: Sat, 7 Nov 1992 15:52:48 GMT
  12. Lines: 23
  13.  
  14. In article <klamer.720538594@mi.el.utwente.nl> klamer@mi.el.utwente.nl (Klamer Schutte) writes:
  15. >]But such knowledge is not necessary; the LINKER can decide the layout of
  16. >]data in memory!  But alas, that would require new smarter linkers, and
  17. >]then you couldn't use a cfront compiler.
  18. >
  19. >OK, that holds for global / static variables. But how for auto variables?
  20. >These generally are efficient to use, but to be efficient, their size
  21. >must be known at compile time. 
  22.  
  23.     Why? Why cant the size be calculated by a smart linker
  24. at link time? Why cant assembly output be made by the compiler
  25. with 'sizeof_someobject' as a symbol yet to be determined?
  26.  
  27. >and thus can only a pointer to an object on the heap be used.
  28.  
  29.     NO, and I have SEEN it done otherwise in a Modula compiler,
  30. I used it and it worked.
  31.  
  32. -- 
  33. ;----------------------------------------------------------------------
  34.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  35.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  36. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  37.