An Anonymous structure type (lambda structure), is a structure without a name (and the features that comes with it).
It is kinda the base of a named structure.
To make an anonymous structure type we can either start with struct or {{.
Then we have to put the attribute, their type and/or their value inside.
An anonymous structure type belongs to everyone, so everyone can see and access the attribute of a lambda structure. The only way to restreint the usage of attribute outside its definition scope is to use the get specifier for the attributes that won’t be able to be modified.
// example, code not working as it is
// file1
package pkg1
func AStruct() {{a int}} => {{a int}}{42}
// file2
package pkg2
func AStruct() {{get a int}} => {{a int}}{42}
// file3
package main
import {
pkg1
pkg2
}
func main() {
astruct1 := pkg1.AStruct()
astruct1.a = 31 // ok
astruct1 = pkg2.AStruct() // ko, the get specifier is part of the type identity
astruct2 := pkg2.AStruct()
astruct2.a = 18 // ko, the attribute a has the get specifier
}