Support for explicit records in expressions, types, and patterns. Most of these features are now implemented in OrcScala.

Here is a proposed syntax for record expressions and record types, using {{ {.  .} }} as delimiters and {{,}} as the separator:

{{ {. x = 3, y = true .} }}

{{ {. x :: Integer, y :: Boolean .} }}

The choice of delimiter is to keep plain {{ { } }} braces available for some other purpose, or alternately to continue using variants of {{ { } }} as delimiters for other features. Note that comments {{ {-  -} }} already follow this pattern.

There will also be some primitive site or operator which extends/expands/merges records. One option is to provide a site {{Expand}}, with the following spec: the call {{Expand(r,s)}} returns a new record which contains all of the fields of {{s}}, and all of the fields in {{r}} whose labels do not also occur in {{s}}. Thus {{s}} is an overriding extension of {{r}}. Note that this is not mutation: a new record is created, and neither {{r}} nor {{s}} is changed.

We could use {{r + s}} as syntactic sugar for {{Expand(r,s)}}. In this context {{+}} is not commutative, but it is also not commutative in the context of string concatenation, so it is a reasonable compromise.

Record types will support width and depth subtyping, but will not use row polymorphism. This will permit quick and simple implementation, though it will cause problems in the classic recursive type case; however, given the flexibility of site-based type definition in Orc, and the ability to use the underlying Java type system, this should not be a problem in practice. 

Records will also be usable in pattern matching. Here, we have two options:

# Record patterns are always implicitly 'views' of a record. For example, the pattern {{>{. x = n .}>}} matches any record which contains an {{ x }} field, even if the record also contains other fields. This is easier to use, but makes it impossible to express the restriction of a record match to an exact set of fields.
# Record patterns match exactly the set of fields named. We then recover the previous functionality with a special syntax, for example {{>{. x = n, ... .}>}}.