ValueType
interfacein packageklyn
public interface ValueType
ValueType

Marks a type whose values cannot be null. Non-primitive variables and fields must be assigned before they are read. Primitive numeric values retain their zero initialization in arrays. For other value types, size-created arrays construct a distinct T() in each slot; an accessible constructor with no required arguments is necessary. Array literals and copies instead use their supplied elements without extra construction. This marker does not provide constructors or change member visibility.

Example
import klyn.collections
class CounterValue implements ValueType:
    public readonly property number as Int
    public CounterValue(number as Int = 0):
        this.number = number
values = CounterValue[2]
assert values[0].number == 0