Well, I'm speaking from a position of relative ignorance but I'm thinking of a compiler as a procedural programming task and the idea of dropping in components is less relevant than a typical line of business application which has lots of rule validators, repositories, and so on.
Well, I'm also speaking from a position of relative ignorance since I've only ever written fairly simple compilers, and maybe I did it "wrong." But, my approach was to write a recursive-descent parser to turn the input into an abstract syntax tree and then render the output in a variety of ways using pluggable "back ends" that are selected by the main program. By my lights it seems to follow the spirit of dependency injection.
2
u/RICHUNCLEPENNYBAGS Apr 25 '14
Well, I'm speaking from a position of relative ignorance but I'm thinking of a compiler as a procedural programming task and the idea of dropping in components is less relevant than a typical line of business application which has lots of rule validators, repositories, and so on.