home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1784 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
  3. From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
  4. Subject: Nested functions (was: Re: Zero-length structures and pointer comparisons)
  5. Message-ID: <9235019.15484@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. 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>
  9. Date: Tue, 15 Dec 1992 08:05:24 GMT
  10. Lines: 27
  11.  
  12. ark@alice.att.com (Andrew Koenig) writes:
  13.  
  14. >maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  15. >
  16. >> Do you personally favour nested functions?
  17. >
  18. >In general, yes.  For C++, I'm not sure.
  19. >
  20. >> If not, why not?
  21. >
  22. >The main argument against it is that C doesn't have them, which means
  23. >that having them in C++ would make C interoperability more difficult.
  24. >It would also be more difficult to interface C++ programs with
  25. >low-level assembly-language things like on-board controllers.  I don't
  26. >care about that personally, but I know that other people do.
  27.  
  28. I don't see why this is a good counter-argument. After all, C doesn't
  29. have classes, constructors, exceptions, templates, etc., etc., but
  30. we still manage. Why are nested functions so hard? I think that 
  31. Gnu C's implementation of nested functions shows that it does not
  32. cause any particularly difficult implementation problems.
  33.  
  34. -- 
  35. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  36. This .signature virus is a self-referential statement that is true - but 
  37. you will only be able to consistently believe it if you copy it to your own
  38. .signature file!
  39.