ColdStore has been designed to permit the inclusion of new Basetypes. A Basetype is any C++ object which has been interfaced to a ColdStore interpreter by means of the Data C++ object.
The C++ Data object provides a set of virtual methods (modelled on Python's) which any Concrete Protocol may call on any instance of any objects stored by ColdStore.
Data also provides for the instantiation of C++ objects into ColdStore persistent heap. In particular, virtual methods defined on a C++ object are guaranteed to be available to C++ objects instantiated within the persistent heap, so long as those objects follow the Virtual Protocol.
The object's hash as an encoded integer
The object's truth value
The object as a literal
Constructor args to recreate object
1,0,-1 depending on order
construct from literal
construct from constructor args
The following operators are intended to provide `arithmetic' operations on Data. Compilers are able to generate opcodes in response to conventional infix arithmetic operator orthography, which map to elements of their Concrete Protocol which subsequently invoke these operator virtuals.
Nothing is intended to prevent an object from interpreting a given conventional sign in an ideosyncratic manner, for example, String might interpret the operator "+" as a concatenation operation.
monadic `+', absolute value
monadic `-', negative absolute value
dyadic `+', add
dyadic `-', subtract
dyadic `*', multiply
dyadic '/', divide
dyadic '%', modulo
unary '~', invert
dyadic '&', bitwise and
dyadic '^', bitwise xor
dyadic '|', bitwise or
dyadic '<<', left shift
dyadic '>>', right shift
length of the object, considered as a sequence
concatenate two sequences
dyadic `[]', index
dyadic `in', matching subrange
delete subrange
replace subrange
return an iterator
return map as sequence
call object (Method, Builtin)