Comment

Comment by hedora

I think C++ templates have hit a turning point where you can push much more static type information into your program and the compiler errors are increasingly useful.

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.

https://github.com/nlohmann/json

parent hedora 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton