SRFI 253: Data (Type-)Checking

by Artyom Bologov

status: draft (2024-08-12)

keywords: Type Checking

Abstract

Data validation and type checking (supposedly) make for more correct code. And faster code too, sometimes. And, in rare cases, code that's easier to follow than the un-checked one. Unfortunately, Scheme does not have many (type-)checking primitives out of the box. This SRFI provides some, with the aim of allowing more performant and correct code with minimum effort on the user side. Both (manual) argument checking/validation (check-arg) and return value(s) (values-checked) checking/coercion are provided. Syntax sugar like lambda-checked and define-checked is added on top.