How might we go about allowing the user to specify a type conversion?
If we do it in a templated way from within C++, like:
We limit the ability to add one from within ChaiScript.
If we do something more generic like:
chai.add(conversion(fromTypeId, toTypeId, conversionFunction));
conversionFunction is a function that takes a
Boxed_Value and returns a
Boxed_Value, we allow the user to specify conversion functions from within ChaiScript, but introduce the possibility of the user creating an infinite loop where one conversion function calls another recursively.