Original Post
I'm writing a simple scripting type system, and one central part is how values are represented. In this system, the only types used are bool, int, float, string... the issue is because I don't require the scripter to specify value types i the script... e.g if loading a script fragment through XML we might have. I'm considering a Value class which is created from a string, and stores the bool/int/etc values of that string where they can determined, and marks which types the value can be used for. It's also fairly easy to define an order of conversion: bool -> int -> float -> string i.e a value of a type can be treated as any type to the right, but not to the left (int can be read as float, float can't be read as int). This IS a simple system I'm putting together, so probably any value system would be usable. But there's all kinds of choices about how to represent a value, decide on conversions between types, etc. Any thoughts?