class - pannous/warp GitHub Wiki
The class keyword marks definition of a type:
class contact {
name
email?
phone?
address {
street
city
zip?
}
}
Again we have the concept of matching by type name: The field email is inferred to have type Email.
Names of several words
A class name may be several words; together they are one name, written with a hyphen when printed:
class full name { given:text; family:text }
ann = full name{given:"Ann", family:"Lee"}
type of ann // full-name
ann.family // "Lee"
The spaced words name the class wherever it is used, also as a parameter type (to greet a full name: …).
Planned: fields named by several words, first name and last name (card multi-word-fields).