2010-01-06

Reflection and Serialization

It is fun writing C++ again, but it is no fun writing serialization code in a language that lacks reflection. Being able to treat a nice, concrete object as a map and just iterate over fields is a huge win. The success of RoR's ActiveRecord ORM, and its followers, make this statement boringly inarguable.

I need to dig more into Go's capabilities in this regard, tho' I don't see reflection right off the bat. For a lot of things, you don't even need runtime reflection. Most (but not all) template metaprogramming in C++ is just sizeof() pyrotechnics to enable some limited reflection.

No comments:

Post a Comment