3 ms·
FWIW, the implementation of Oil is following a "gradual" trajectory. It's amazing how long various "wrong" things were in the codebase! I was already 8-9 month
by chubot 9y ago
FWIW, the implementation of Oil is following a "gradual" trajectory. It's amazing how long various "wrong" things were in the codebase!
I was already 8-9 months into coding with over 10K lines of code before I added ASDL schemas for the AST [1].
I believe this was a good thing, because I had running code from the start, and the only way to understand shell is over many months. It's impossible to just "think about it" and come up with the correct schema. The schema follows not just from understanding the language, butfrom the algorithms you need to implement on the language. [2]
So I see the value in both -- starting out with a very loose notion of types, then making it stricter.
I'm taking the next step now and am looking to make that detailed schema static rather than dynamic [3].
[1] Success with ASDL http://www.oilshell.org/blog/2017/01/04.html http://www.oilshell.org/blog/2017/01/04.html
[2] From AST to Lossless Syntax Tree http://www.oilshell.org/blog/2017/02/11.html http://www.oilshell.org/blog/2017/02/11.html
[3] Building Oil with the OPy Bytecode Compiler http://www.oilshell.org/blog/2018/03/04.html http://www.oilshell.org/blog/2018/03/04.html
(copy of Reddit comment)