PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Refinement Types

Refinement Types

Refinement Types are a feature.

A type endowed with a predicate which is assumed to hold for any element of the refined type.


Languages with Refinement Types include Raku

Example from Raku:
subset Color of Any where Color | CMYK_Color;
reference-feature.html 路 refinement-type-feature.html 路 runtime-guards-feature.html

View source

PLDB - Build the next great programming language 路 v2022 Day 29 Docs Build Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com