This section needs work and is not fully accurate as is.
Necessary Features
In order for a language to be called "implemented" in BMS, it needs to support the following features:
- Every script function which is registered on a type's namespace must:
- Be callable on a
ReflectReferencerepresenting object of that type in the script
local my_reference = ... my_reference:my_Registered_function()- If it's static it must be callable from a global proxy object for that type, i.e.
MyType.my_static_function() - Be callable on a
ReflectReferencesmust support a set of basic features:- Access to fields via reflection i.e.:
local my_reference = ... my_reference.my_field = 5 print(my_reference.my_field)- Basic operators and standard operations are overloaded with the appropriate standard dynamic function registered:
- Addition: dispatches to the
addbinary function on the type - Multiplication: dispatches to the
mulbinary function on the type - Division: dispatches to the
divbinary function on the type - Subtraction: dispatches to the
subbinary function on the type - Modulo: dispatches to the
rembinary function on the type - Negation: dispatches to the
negunary function on the type - Exponentiation: dispatches to the
powbinary function on the type - Equality: dispatches to the
eqbinary function on the type - Less than: dispatches to the
ltbinary function on the type - Length: calls the
lenmethod onReflectReferenceor on the table if the value is one. - Iteration: dispatches to the
itermethod onReflectReferencewhich returns an iterator function, this can be repeatedly called until it returnsScriptValue::Unitto signal the end of the iteration. - Print: calls the
displaymethod onReflectReferenceor on the table if the value is one. - Debug print: calls the
debugmethod onReflectReferenceor on the table if the value is one.
- Addition: dispatches to the
- Script handlers, loaders etc. must be implemented such that the
ThreadWorldContaineris set for every interaction with script contexts, or anywhere else it might be needed.