-
I use
std::anyinstead of Java'sObject, but could potentially usestd::variant<bool, double, std::string>in the future -
Not sure if string interning will be implemented in the book, but it could greatly reduce the cost of copying
std::anyobjects - it's cheap when it hasboolordoublein it, but not so when it has thestd::string- if there was a global table of strings andstd::anyhad a pointer to a string, it would be much cheaper. -
Visitor pattern as in book doesn't work in C++ - you can't have template virtual methods. For now only
ExprVisitor<std::any>is supported in expressions - but that's enough for now. -
I don't use code generation as done in the book. Generating C++ feels dangerous and incorporating it into CMake build is not easy. Maybe later?
This repository was archived by the owner on Nov 8, 2023. It is now read-only.