Skip to content

Switch from type Pattern to matching Pattern #5

@c3d

Description

@c3d

The documentation used to refer to a pattern-based type definition using the type Pattern notation. For example, complex would be defined as

complex is type complex (Re:real, Im:real)

This notation is a bit confusing since it does not explain why something is a type. Also, I would like to be able to use type (Expression) to return the type of an expression (although that might be typeof)

The documentation now uses matching for that usage. With syntactic sugar, the recommended way to describe the complex type above would now be:

type complex is matching complex(Re:real, Im:real)

The interpreter and compiler should be updated to match.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions