The implementation is based on the "pimpl idiom", whereby dynamic::var contains a pointer to an object of type dynamic::var_impl. dynamic::var_impl is pure virtual base class which is inherited by a number of implementation classes, such as dynamic::types::null_impl, dynamic::types::int_impl etc.
Operator overloading is used to allow dynamic::var to be used with a natural syntax, but this is really just sugar around the implementation. dynamic::internal::var_methods implements most of the methods on the dynamic::var, simply because there are other "var-like" classes (such as dynamic::internal::var_member).
dynamic::var wraps dynamic::var_variant, which is a 16-byte buffer containing an object of type dynamic::var_impl. If the object is small then it is stored within the var itself, but if the object is large, then the var contains a pointer to a dynamic::shared_var_impl. This essentially explains the behaviour of integers which are copied by value, but larger objects such as strings are always copied by reference.
1) Syntax classes are used to implement operators, and allow the seamless use of var by the user. The type visible to the user is dynamic::var, however there are various supporting classes and functions.
2) Types implement the various types. All implementation classes inherit from the pure virtual base class dynamic::var_impl.
3) Library functions and utilities. Many of these are functions which create a dynamic::var containing one of the Types classes.
4) Memory and thread management includes garbage collection and threading, which provide the underlying support for the implementation.
5) Unit tests are the unit testing functions.
1.5.7.1