home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18830 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.4 KB  |  41 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!enterpoop.mit.edu!usc!zaphod.mps.ohio-state.edu!uunet.ca!frumious!pat
  3. From: pat@frumious.uucp (Patrick Smith)
  4. Subject: Re: Standard library functions and macros
  5. Message-ID: <C0Is7A.8E@frumious.uucp>
  6. Date: Fri, 8 Jan 1993 05:21:10 GMT
  7. Reply-To: uunet.ca!frumious!pat
  8. References: <1993Jan5.032555.12777@lucid.com> <1993Jan06.183334.4535@microsoft.com> <1993Jan7.042121.23809@lucid.com>
  9. Organization: None
  10. Lines: 29
  11.  
  12. It seems to me that, even if the C++ standard prohibits implementing
  13. standard library functions as macros, an implementation could still
  14. allow programs to write something like
  15.  
  16.    #pragma macros
  17.    #include <stdio.h>
  18.  
  19. or
  20.  
  21.    #define __STANDARD_MACROS
  22.    #include <stdio.h>
  23.  
  24. to get C-style function declarations (external declarations,
  25. possibly masked by macros).
  26.  
  27. Such an implementation would permit programmers to get the
  28. C-style declarations with one simple change to their programs.
  29. Furthermore, this change could easily be automated if it were
  30. necessary to change a large number of source files.
  31.  
  32. My guess is that a very small percentage of programs would be
  33. adversely affected by the prohibition of macros, so requiring
  34. the maintainers of such programs to make a small change like
  35. this seems reasonable to me.
  36.  
  37. -- 
  38. Patrick Smith
  39. uunet.ca!frumious!pat
  40. pat%frumious.uucp@uunet.ca
  41.