Skip to content

Unboxed wrapper types (newtypes) #637

@lpil

Description

@lpil

Support creation of type wrappers that function like custom types of a single field, require explicit boxing and unboxing, and at runtime all boxing is erased so there is no runtime overhead.

i.e. Cents wraps an Int. At runtime it is just an Int, no record wrapper.

This is called a newtype in Haskell.

What should the syntax be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe approach has not yet been decidedhelp wantedContributions encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions