unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Noah Lavine <noah.b.lavine@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: The progress of hacking guile and prolog
Date: Tue, 23 Nov 2010 20:54:37 -0500	[thread overview]
Message-ID: <AANLkTi=6irK6naatSmcDBEs+wNQvOYXTikX5CAc5kq7O@mail.gmail.com> (raw)
In-Reply-To: <m3aal42q50.fsf@unquote.localdomain>

Hello,

That might make sense. The documentation certainly looks interesting.

What I'm thinking of is like racket contracts, but with the idea of
"trusted modules", which might involve static checking. For instance,
if the contract is that map's second parameter is a list, you'd
normally want to check that. But if a module that used map could
guarantee that it would always pass a list as the second argument,
then you'd arrange things so the second module could skip the type
check.

I'm curious in general though whether it would be possible and
worthwhile to statically check programmer-defined ideas, as long as
the interface is easy enough to use. For instance, what if you could
ask Guile to check that your tree structure always remained a binary
tree? Or better, what if you wrote a GUI program and checked that the
callbacks you passed to the GUI library would always return? (I know
it's not possible in general, but I think it will work for a subset of
procedures that will include some interesting ones.)

Noah

On Sat, Nov 20, 2010 at 6:25 AM, Andy Wingo <wingo@pobox.com> wrote:
> Hi Noah,
>
> On Thu 04 Nov 2010 03:40, Noah Lavine <noah.b.lavine@gmail.com> writes:
>
>> I think that Guile should offer optional static checking - not just of
>> types, but of everything that we can check.
>
> It seems like you're really asking for *dynamic* checking -- not only
> checking properties that can be proved statically, without running the
> program, but also runtime properties.
>
> In this regard, I have a positive impression of the work that people are
> doing on "contracts", especially the Racket folks.
>
>    http://docs.racket-lang.org/reference/contracts.html
>
> Happy reading,
>
> Andy
> --
> http://wingolog.org/
>



  reply	other threads:[~2010-11-24  1:54 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 20:23 The progress of hacking guile and prolog Stefan Israelsson Tampe
2010-11-03 23:43 ` Ludovic Courtès
2010-11-04  2:40   ` Noah Lavine
2010-11-10 17:55     ` Stefan Israelsson Tampe
2010-11-11 19:10       ` Noah Lavine
2010-11-11 16:26     ` Ludovic Courtès
2010-11-11 19:13       ` Noah Lavine
2010-11-11 19:15       ` Noah Lavine
2010-11-15 23:10     ` Typechecking I Stefan Israelsson Tampe
2010-11-20 11:46       ` Andy Wingo
2010-11-20 11:25     ` The progress of hacking guile and prolog Andy Wingo
2010-11-24  1:54       ` Noah Lavine [this message]
2010-11-24 16:45         ` Stefan Israelsson Tampe
2010-11-24 18:00         ` piper schemigan Stefan Israelsson Tampe
2010-11-24 20:18           ` Andreas Rottmann
2010-11-25 21:17           ` Ludovic Courtès
2010-11-26 22:18             ` Stefan Israelsson Tampe
2010-11-28 22:30               ` Guile-SCSH Ludovic Courtès
2010-11-28 23:02                 ` Guile-SCSH Stefan Israelsson Tampe
2010-11-28 23:24                   ` Guile-SCSH Jose A. Ortega Ruiz
2010-11-29 18:56                     ` Guile-SCSH Stefan Israelsson Tampe
2010-11-29 21:26                     ` http://gitorious.org/guile-scsh/guile-scsh Stefan Israelsson Tampe
2010-11-30 23:21                       ` Guile-Facade Ludovic Courtès
2010-11-25 21:26         ` The progress of hacking guile and prolog Ludovic Courtès
2010-11-26 16:41           ` Noah Lavine
2010-11-26 10:45         ` Andy Wingo
2010-11-20 11:26     ` Andy Wingo
2010-11-04 17:57   ` Stefan Israelsson Tampe
2010-11-05 21:19   ` Stefan Israelsson Tampe
2010-11-19 23:11     ` GLIL->C compilation Ludovic Courtès
2010-11-19 23:20       ` Stefan Israelsson Tampe
2010-11-19 23:56         ` Ludovic Courtès
2010-11-20 12:18           ` Andy Wingo

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='AANLkTi=6irK6naatSmcDBEs+wNQvOYXTikX5CAc5kq7O@mail.gmail.com' \
    --to=noah.b.lavine@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /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).