r/programming • • Apr 23 '14

You Have Ruined JavaScript

http://codeofrob.com/entries/you-have-ruined-javascript.html
283 Upvotes

327 comments sorted by

View all comments

Show parent comments

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.

1

u/dventimi Apr 25 '14

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.