Whiley / RFCs

Request for Comment (RFC) proposals for substantial changes to the Whiley language.
3 stars 2 forks source link

Singleton (or Unit) Types #83

Open DavePearce opened 3 years ago

DavePearce commented 3 years ago

It probably makes sense to support type declarations of the following form:

type Null

These are so-called unit types. We could then actually remove the null type altogether. However, we would need someway to construct values for them. We could repurpose the empty tuple or empty record for this?