rebellion icon indicating copy to clipboard operation
rebellion copied to clipboard

Record contracts

Open jackfirth opened this issue 5 years ago • 0 comments

There should be contract combinators for rebellion/collection/record. Use cases:

  • Heterogeneous records where the field names are known at compile time and each field contains a different type of data. (Related: #400).
  • Homogeneous records where the fields are unknown and all fields contain the same type of data.

Racket resolves this with separate combinators like list/c and listof, but I always found that confusing. It also doesn't work well when some fields are known but not all (see list*of and *list/c). Maybe an ellipses-based solution would work instead?

jackfirth avatar Jan 22 '20 03:01 jackfirth