Object construction

Objects can also be created with an object construction expression that has the syntax T(fieldA: valueA, fieldB: valueB, …) where T is an object type or a ref object type:

  1. var student = Student(name: "Anton", age: 5, id: 3)

Note that, unlike tuples, objects require the field names along with their values. For a ref object type system.new is invoked implicitly.