-
-
Notifications
You must be signed in to change notification settings - Fork 4
field
Field, property, aspect and member denote almost the same thing: a part of an object.
The only difference between a field and a property is that a property has get and set methods.
Because functions in angle can be invoked without parenthesis, the use of properties, fields and functions are at times opaque(transparent?) to the developer.
A person has the aspects name and address, written in angle as:
person{
name
address
}
As always types can be omitted if the property name is equal to its type:
Otherwise fields can be typed like variables: With prefixed type
person{
Name secret_name
}
Or with suffixed type:
person{
secret Name
}
Or with coloned type:
person{
secret:name
}
Capitalized types are mere convention when splitting a property name and its type.
They become semantically meaningful if both Secret and Name in secret Name
are types.
Todo:
DoubleType types:
what if both Secret and Name are types in secret name
?
Multiple inheritance? postpone this problem.
Todo: DoubleType coloned type:
person{
secret::name // as in which other languages?
}
Todo: in and as operators for typing
person{
age in years
name as string
}