Get the latest tech news
Dear sir, you have built a compiler (2022)
Sir, I am afraid to inform you that you have built a compiler. I know you wanted a “simple prototype” that would just add that one feature to your programming model.
You said that “SSA is an overkill” and “it’s just way too much infrastructure to maintain for a simple task” and yet, six months later, you have pile of string mangling scripts that do not work—breaking every time a user input slightly deviates from things you’ve seen before. One of your brilliant team member suggests a pre-processing stage: de-nest all definitions, hoist all expressions, flatten out all control, and that way, you only have to handle 50 AST nodes because you will know, yes know, that the program cannot have any other shape. In the last leg of your journey to avoid building a compiler, your manager tells you that your code should run on older machines, which only support version 0.8.
Or read this on Hacker News