Re: 2 easy questions


[ Follow Ups ] [ Post Followup ] [ Discussion Board ] [ FAQ ]

Posted by Steve VanDeBogart on February 17, 2004 at 19:47:45:

In Reply to: Re: 2 easy questions posted by N V Krishna on February 17, 2004 at 18:20:12:

: : Does the following type check?

: : (if #t
: : (lambda (a b) a)
: : (lambda (x y) y))

: Yes.

But you said that the then and else clause had to have the same type. I didn't think that (t1 t2) -> t1 was the same as (t3 t4) -> t4.

I think you missed one of my previous questions:
: I'm having trouble coming up with the type rules for set!. Probably because there are multiple definitions that make sense. It's kind of like assignment in an OOP language in that it can change the run time type of a variable. But different because there's no declared type for variables in scheme. I guess my question is how do we deal with a program that has a set! which changes the type of a variable? Or even worse, conditionally changes the type of a variable? Does it just not type check if a set! changes the type?

--
Steve



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Discussion Board ] [ FAQ ]