Geek Noise
Rants, rambles, news and notes by Peter Provost
23

More About Code Generation

Wednesday, 23 April 2003 04:18 by Peter Provost

Gordon commented on my post about Code Generation with the following:

I think the original C++ "Compiler" was actually a C++ preprocessor that outputs C, which then gets compiled in the ordinary way. I think that the CFront C++ compiler works this way as well.

That is exactly what I was talking about. C++ effectively provided a new level of abstraction on top of C. We were able to write code using these new abstractions (i.e. classes). The C++ "preprocessor" then produced C code which our compiler would turn into machine code. The fact that it happened behind the scenes doesn't really change the fact that we were using a code generator.

I guess we have been using code generators all along, eh?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
Comments are closed