On Nov 11, 2012, at 2:48 PM, John Clements wrote: >> >> I'm not sure why this would be. Is the code students write unrestricted? > > Pretty much, yes. So, for instance, a student might write: > > (signal-play > (network () > [s ((looper song2))] > [ctr ((loop-ctr 0 1))] > [on? (toggle ctr)] > [out (reverb s)])) > > where the signals take on float, boolean, or any kind of value. This expands > into something containing this "inner loop" procedure: > > (lambda () > (define s (n1)) > (define ctr (n2)) > (define on? (toggle ctr)) > (define out (reverb s)) > (set! saved-s s) > (set! saved-ctr ctr) > (set! saved-on? on?) > (set! saved-out out) > out) > > It would be pretty hard to assign types any tighter than "any" to these rhs > expressions.
John, are the students really writing code w/o constraints? Would it be much of an imposition to ask for base types?
smime.p7s
Description: S/MIME cryptographic signature
____________________ Racket Users list: http://lists.racket-lang.org/users