Each struct
is compiled to a self-contained JVM class.
Given:
module sample struct Point = { x, y }
a class sample.types.Point
is being generated.
It is important to note that:
struct
class is final
,
struct
class inherits from gololang.GoloStruct
,
toString()
, hashCode()
and equals()
are being provided.