unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Artyom Bologov <mail@aartaka.me>
To: guile-devel@gnu.org
Subject: Type declarations and data validation utils?
Date: Tue, 16 Jul 2024 14:03:39 +0400	[thread overview]
Message-ID: <87le21psas.fsf@aartaka.me> (raw)

Hi y'all,

I've compiled a generic collection of data-checking macros (which I'm
consider contributing as SRFI), but I'm not satisfied with their
performance. Dave Thompson's blog post shows benefits from adding type
predicates before the code, but it seems that my approach of adding
assert-s to the start of the function is less effective and adds a lot
of performance overhead.

Thus the question: is there any way to declare types that Guile will
accept and act on? Especially if this way it exported for user to play
with. I haven't found any pointers in the manual, thus I'm asking it
here (I'm also asking it on the devel list because devs are more likely
to know the ins and outs of typing and maybe even able to act on it.)

Thanks,
--
Artyom Bologov
https://aartaka.me



             reply	other threads:[~2024-07-16 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 10:03 Artyom Bologov [this message]
2024-07-21 17:13 ` Type declarations and data validation utils? Maxime Devos
2024-07-21 23:26   ` Artyom Bologov
  -- strict thread matches above, loose matches on Subject: below --
2024-07-20 23:10 Artyom Bologov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le21psas.fsf@aartaka.me \
    --to=mail@aartaka.me \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).