[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The progress of hacking guile and prolog

From: Ludovic Courtès
Subject: Re: The progress of hacking guile and prolog
Date: Thu, 25 Nov 2010 22:26:48 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)


Noah Lavine <address@hidden> writes:

> 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.

In Guile, modules are dynamic by nature: they are assembled at run-time
(everything is “dynamically linked”).  My feeling is that cross-module
static analysis doesn’t fit well in this framework.

> 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?

I think you’ll be interested in dependent types:

Though I’d recommend working on JIT for Guile before you get stuck in a
meta-circular Curry-Howardish enlightenment period.  :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]