guile-devel
[Top][All Lists]
Advanced

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

Re: Associate type information to tree-il expansions


From: Andy Wingo
Subject: Re: Associate type information to tree-il expansions
Date: Wed, 23 Nov 2011 23:04:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Stefan,

I must apologize for not responding to your mails!  Or rather, for
responding so late.  Apologies in any case.

On Sat 14 May 2011 20:57, Stefan Israelsson Tampe <address@hidden> writes:

> (macroexpand '(let ((A : integer 1)) A))
> $2 = #<tree-il (let (A) (#{A 110}#) ((const 1)) (lexical A #{A 110}#) 
> (integer))>

Obviously we'd need to type everything else, but OK.  I guess my overall
reaction here is one of fear.  This is really hard to get right.  Though
I am not against types in tree-il in principle, I have a hard time
thinking how this can be a win for Guile.

There are two reasons that I know of to use types: one, to avoid
run-time type checks.  This could be useful to Guile in the future, but
we are not fast enough yet for it to matter.  Secondly, types can prove
things about programs.  But I have a hard time thinking how this relates
to the untyped parts of Guile, which will always be there.  The best
work in this area that I know of is Typed Racket, and their treatment of
types and contracts.

So, to get the advantages of types, I think it needs to be in a context
of stealing from Racket.  That, in itself, is quite an effort; doable,
but it takes commitment.  It does not seem to me that half-way
approaches are useful.

But I really don't know.  What do you think?

Regards,

Andy
-- 
http://wingolog.org/



reply via email to

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