Hi Noah, On Wed 24 Nov 2010 02:54, Noah Lavine <noah.b.lav...@gmail.com> writes:
> What I'm thinking of is like racket contracts, but with the idea of > "trusted modules", which might involve static checking. Yeah, definitely. Like the interface between typed and untyped code in racket, also. I don't know very much about the relationship between types and contracts, though. > 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.) It's certainly interesting! As I understand things (which is not very far), Racket allows for this via other "languages". Guile could do that too. We might need some more generic support for this kind of thing in the compiler infrastructure or in tree-il or whatever, but I would like to make it possible to experiment with these linguistic ideas, with the kind of isolation provided by modules. Cheers, Andy -- http://wingolog.org/