home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,944 of 33,346   
   Andre Kaufmann to All   
   Re: Are MACROS good and can the compiler   
   16 Feb 12 21:18:11   
   
   From: akfmnews@t-online.de   
      
   >> - Macros prevent the compiler to be as fast in compilation as compilers   
   >...   
      
   >That's the preprocessor in general, not macros specifically, or isn't it?   
      
   Depends, since a simple preprocessor with simple local macros is supported   
   in many languages.   
   Better said, that's commonly not a preprocessor like in C++, but a part of   
   the compiler itself.   
      
   I think it's the global character of macros. If macros would only have an   
   effect   
   on the current header file (by default), the compiler would only have to   
   recompile   
   the current header file and/or create automatically precompiled header   
   files.   
      
   But a simple macro may change the complete code (#ifdef ....) and it's hard   
   for the compiler to track which header or cpp file is using or has an effect   
   on it.   
      
   There are situations, where macros must be globally visible, but currently   
   the compiler can't differentiate between local macros or global macros.   
      
   Andre   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca