2 ms·
A funny thing is that this can go N layers deep. At a previous job we had a DSL which was very well specified, pretty straight forward, and had been written by
by rozap 3y ago
A funny thing is that this can go N layers deep. At a previous job we had a DSL which was very well specified, pretty straight forward, and had been written by an exceptionally brilliant engineer (who was even still at the company!). We had two backend services that would operate on that AST in a query context and in a streaming transformation context, and they shared the parser, compiler, and typechecker. The problem was that the engineering team was so fragmented and lacking in stable technical leadership that a large part of the engineering team had no idea about how these things worked, so on every project they were constantly going "Ooops, I created a feature which has its own intermediate representation with slightly different semantics so reuse is impossible". It was super hard to deal with and stuff was constantly being invented and then thrown out because it couldn't be extended.
The only thing worse than creating a compiler is being unaware that one already exists and creating a new one on top of the existing one.