by hedora · 9y ago · 0 comments
For instance using the json for modern c++ json parser, you can write this:
myclass c = json_node;
and it compile time statically checks that a json->myclass deserializer exists, and gives sane errors if one of the (recursive) subfields of myclass does not have a json deserializer.
This makes json processing in python look like blood letting, and is close (until runtime) to the experience I'd expect from ocaml and other functional languages.
But it robs a lot of much slower languages of their best value proposition. You can now do it all in C++ with correctness guarantees and still run 10x faster than most strong typed systems.