Re: [racket-dev] Expansion of optional arguments in lambda

2013-02-24 Thread Robby Findler
Sounds like a good thing to add to test suite! Robby On Sun, Feb 24, 2013 at 2:04 PM, Eric Dobson wrote: > I think I figured out the actual answer which is semantics. If the > arguments are ever set!ed then my implementation will lead to a different > value. > > (define (f a (b (begin (set! a 2

Re: [racket-dev] Expansion of optional arguments in lambda

2013-02-24 Thread Eric Dobson
I think I figured out the actual answer which is semantics. If the arguments are ever set!ed then my implementation will lead to a different value. (define (f a (b (begin (set! a 2) 3))) a) This should return 2 if b is not supplied, but in my expansion it would return what ever was supplied for

Re: [racket-dev] Expansion of optional arguments in lambda

2013-02-24 Thread Matthew Flatt
At Sun, 24 Feb 2013 09:51:12 -0800, Eric Dobson wrote: > lambda supports optional arguments, and does this by expanding out into a > core form that has flag arguments for if each argument is supplied. This is > tricky to type in TR and so I was investigating why it did it this way. I > did a micro

Re: [racket-dev] Expansion of optional arguments in lambda

2013-02-24 Thread J. Ian Johnson
Scratch that, didn't look very deeply at your solution. -Ian - Original Message - From: J. Ian Johnson To: Eric Dobson Cc: dev Sent: Sun, 24 Feb 2013 13:46:14 -0500 (EST) Subject: Re: [racket-dev] Expansion of optional arguments in lambda My guess would be code explosion.

Re: [racket-dev] Expansion of optional arguments in lambda

2013-02-24 Thread J. Ian Johnson
My guess would be code explosion. -Ian - Original Message - From: Eric Dobson To: dev Sent: Sun, 24 Feb 2013 12:51:12 -0500 (EST) Subject: [racket-dev] Expansion of optional arguments in lambda lambda supports optional arguments, and does this by expanding out into a core form that has f