Boxing of values in Sebyla

Constantine Plotnikov

There are much less need for boxed values types in Sebyla then in C# and ECMA CLI as Sebyla supports tempalate types. But there are rare cases when boxing is needed. For example in reflection api.

There are two kinds of boxed values, mutable boxes and immutable boxes. ECMA CLI supports only mutable boxes but they are exposed to C# as almost immutable ones.

First versions of prototype will support only immutable boxes. Mutable boxes will be possibly added later.

Boxed values are objects of T.Boxed type. This is different from ECMA CLI where type of boxed value and type of value is the same. This allows to use boxed types as parameters and explicit variables.

Any value type supports boxing. Any interfaces that are declared on value type, are implemtend on boxed object. As boxed values are immutable, no method could modify this value or create pointer to it.

Types that are equivalents of boxed value types could be created manually.