public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* srfi 145
@ 2022-09-29  7:48 Arvydas Silanskas
  0 siblings, 0 replies; only message in thread
From: Arvydas Silanskas @ 2022-09-29  7:48 UTC (permalink / raw)
  To: kawa mailing list

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Good day,

what are your opinions on srfi 145? Looking at it, it could be a decent
r7rs portable way to provide some degree of static type checking. The work
would involve adding a syntax tree rewrite pass. For example, code such as

(define (foo a)
  (assume (integer? a))
  ...)

would be transformed to

(define (foo a ::int)
  ...)

and then the rest of it would be usual kawa behavior. Certainly making it
as powerful as a standard kawa syntax would be very difficult, but perhaps
it's not necessary? I think handling only function parameters + let
bindings, and only handling base types + user defined simple records would
pragmatically cover a lot of useful cases.

If there is a consensus that this would be useful, I'll give it a shot at
implementing it myself.

Arvydas

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-29  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29  7:48 srfi 145 Arvydas Silanskas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).