A code generator is a set of code that generates another code. This is used when the same code has to be used in different places (where we want to have the same functionality) with different contexts. This helps to avoid repetitive typing and once built, code generators can be used throughout the life of the project at virtually no cost.
There are two main types of code generators:
There are two main types of code generators:
- Passive Code Generators - They run once and produce result. The result is free from the generator used.
- Active Code Generators - They are used each time when a result is required. The result is a throw-away, which can be always reproduced.
- summary of Code Generators, from The Pragmatic Programmer: from Journeyman to Master
No comments:
Post a Comment