Structs
Structs like c-do.
Since SMLL targets the JVM, structs are used in-place of classes and they simply map to record classes in java. SMLL doesn't allow mutation of data so all structs are read only and they have no methods. To manupulate structs use functions, like in c.
Struct literals
Structs are useful as long as you can create their instances. Struct instances are just references to the allocated memory used to represent the struct.
Last updated