home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1828 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.6 KB

  1. Path: sparky!uunet!opl.com!baffin!harvey
  2. From: harvey@opl.com (Harvey Reed)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Nested functions (was: Re: Zero-length structures and pointer comparisons)
  5. Message-ID: <harvey.724609916@baffin>
  6. Date: 17 Dec 92 16:31:56 GMT
  7. References: <9234601.10277@mulga.cs.mu.OZ.AU> <1992Dec11.231131.10956@microsoft.com> <24392@alice.att.com> <1992Dec12.162211.5076@ucc.su.OZ.AU> <24400@alice.att.com> <9235019.15484@mulga.cs.mu.OZ.AU> <24413@alice.att.com> <BzBHn4.26J@ssesco.com>
  8. Sender: news@opl.com
  9. Lines: 28
  10.  
  11. nau@ssesco.com (William Nau) writes:
  12.  
  13. >>> Why are nested functions so hard? I think that 
  14. >>> Gnu C's implementation of nested functions shows that it does not
  15. >>> cause any particularly difficult implementation problems.
  16. >>
  17. [Koenig replied]
  18. >>The first time I tried to use gcc's nested functions,
  19. >>my program dumped core -- apparently due to a bug in gcc.
  20. >>The next version of gcc I tried worked.  This suggests
  21. >>that the implementation isn't exactly trivial.
  22.  
  23. >It suggests that they didn't properly test that release.  Given
  24. >a decent design, it's not asking that much out of a high level
  25. >language.  It does amaze me that this wonderful object oriented
  26. >language does not allow for nested functions.
  27.  
  28. What can nested functions do that OO features of C++ can't? Use
  29. of nested functions sounds like you may be trying to delegate
  30. implementation, which is a great use for objects.
  31.  
  32.  
  33.  
  34. -- 
  35. ++harvey
  36. ========================================================================
  37. internet:  harvey@opl.com  /  hreed@cs.ulowell.edu  /  h.reed@ieee.org
  38. voice:     617-965-0220
  39.