Examples for code generation

Surprisingly often IT uses different languages to express the same thing. Surprisingly many code pieces are commpletely determined through typed information an can be generated easily. Simple examples for code generation are e.g.:

  1. the conversion of type information between different language

  2. Marshaling of parameters for distributed computing. Or the generation of automatic proxy/stub code

  3. The generation of API documentation from source code. This keeps doc and source in sync.

  4. Generation of startup-code, e.g. a template for a class definition which follows a complicated coding standard used in a framework (naming conventions, helper functions etc.)