Posted by V. Ramakrishna on February 17, 2004 at 20:17:55:
In Reply to: Re: 2 easy questions posted by Steve VanDeBogart on February 17, 2004 at 19:47:45:
I think I can clarify your question, Steve. The then and else types must match, therefore you need to equate them. If ultimately they don't happen to match, you will get a type error.
: 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