fmease / lushui

The reference compiler of the Lushui programming language
Apache License 2.0
7 stars 0 forks source link

Records #18

Closed fmease closed 2 years ago

fmease commented 4 years ago

Example of a record (note: the syntax is not final):

data Person: Type =
    person (field name: Text) (field birth: Date): Person

jane: Person = Person.person (name = "Jane") (birth = date.ymd 1980 1 1)
jane-name: Text = Person.person.name jane-name
jack: Person = Person.person "Jane" (date.ymd 1991 1 2)

Tasks:

This issue describes the MVP of records and does not include named arguments outside of record declarations, re-ordering of applications with named arguments or a record update syntax.

fmease commented 2 years ago

Superceded by #42 + #109.