|
|
|
|
|
by chubot
2108 days ago
|
|
There are 2 builds now: the one that runs under a slice of the Python 2 interpreter, and "oil-native", which is that code translated to C++. Rather than saying Oil is written in Python 2, it's better to say that Oil is written in ASDL + a subset of statically typed Python + an abstract dialect of regexes (similar to Eggex). In other words, it's a bunch of custom DSLs. And all of those DSLs translate to Python 2, as well as C++. So yes there is a lot of metaprogramming going on! This makes the code shorter, more correct, and even pretty fast (slightly faster than bash, and it appears we will maintain that, although it may get slower in the short term) Resources here, happy to answer any more questions: http://www.oilshell.org/blog/2019/06/17.html#why-is-it-writt... http://www.oilshell.org/blog/2020/03/recap.html#mycpp-the-go... |
|