home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17886 < prev    next >
Encoding:
Text File  |  1992-12-13  |  2.4 KB  |  57 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!max.fiu.edu!serss0!feathers
  3. From: feathers@serss0 (Michael Feathers)
  4. Subject: Re: Criticisms Wanted:Callbacks&Runtime methods
  5. Organization: Florida International University, Miami
  6. Date: Sun, 13 Dec 1992 05:12:59 GMT
  7. Message-ID: <Bz6MHn.Apw@fiu.edu>
  8. Keywords: callbacks C++ Runtime methods
  9. References: <1gc6fhINN6nr@tamsun.tamu.edu> <1992Dec12.124839.11240@netcom.com>
  10. Sender: news@fiu.edu (Usenet Administrator)
  11. Lines: 44
  12.  
  13. In article <1992Dec12.124839.11240@netcom.com> erc@netcom.com (Eric Smith) writes:
  14. >I've got that on the back burner.  My parser, which contains its own
  15. >preprocessor, already has some extra macro features I'm using, and I'm
  16. >planning to release a very powerful extended C++ preprocessor in the
  17. >future, which will evolve from it.  I'm using it right now as a
  18. >preprocessor even with C++ compilers that don't have a separate
  19. >preprocessor, just adding mine as an extra initial stage in the
  20. >makefile.  But it doesn't take much extra time because doing the
  21. >preprocessing in advance reduces the workload on the C++ compiler,
  22. >thereby making it faster.
  23.  
  24. Sounds great.  As a little thought experiment for myself, I've been thinking
  25. of designing a C++ like language which maintains the functionality of C++
  26. while simplifying the syntax considerably.  In the process, I've made a 
  27. wish list for a preprocessor.
  28.  
  29. Unlike many people, I do not regard the preprocessor as an evil entity that is
  30. used to hide ugly code and introduce bugs.  In fact, I think that the C and
  31. C++ preprocessors are invaluable when using C and C++ as target languages in
  32. a compiler.
  33.  
  34.  
  35. Here are some things that I've always wanted to add to a preprocessor.  Perhaps
  36. some day I will.
  37.  
  38. 1. A #system directive which executes the text remaining on the line in the 
  39.    operating system shell that the preprocessor is running under.  Some may
  40.    say that this would cause portability concerns, but the include mechanism
  41.    could be used to configure for different Operating systems.  The
  42.    benefits would be numerous.  The preprocessor could be used to automate
  43.    program construction, etc.,.
  44.  
  45.    #system echo __FILE__ __LINE__    // Show people where the processing is now
  46.  
  47. 2. Grammatical production based macros which use the names of C++ tokens and
  48.    regular expressions as atoms.
  49.   
  50.    To keep things simple, the productions could be restricted to LL(1).
  51.   
  52.  
  53. -Mike (doesn't ask for much)
  54.  
  55.  
  56.  
  57.