> Can you give an example of such a language? I'm curious.
Unfortunately I forget which one, I recall that the reason given was that
since the default value couldn't be determined at compile time the
compiler was unable to optimize functions with such default arguments.
Much of my work is in PHP,
FWIW, arguments in Racket are always passed on a stack.
Robby
On Sun, Jan 8, 2012 at 9:12 PM, Gregory Woodhouse wrote:
> I suppose it could prevent certain optimizations in parameter passing,
> forcing space for arguments to be allocated on the heap.
>
> Sent from my iPad
>
> On Jan 8, 2012, at
I suppose it could prevent certain optimizations in parameter passing, forcing
space for arguments to be allocated on the heap.
Sent from my iPad
On Jan 8, 2012, at 12:42 PM, Danny Yoo wrote:
> On Sun, Jan 8, 2012 at 3:23 PM, Jordan Schatz wrote:
>> This code runs, but I'm guessing that its
On Sun, Jan 8, 2012 at 3:23 PM, Jordan Schatz wrote:
> This code runs, but I'm guessing that its not the "right way" to do it.
>
> (define (js-date [i (current-date)])
> (let ([original-format (date-display-format)]
> [return ((λ ()
> (date-display-format 'rfc2822)
>
I think you want parameterize:
(parameterize ([date-display-format 'rfc2822])
(date->string i #t))
In general:
((lambda () e1 e2 ...)) = (begin e1 e2 ...)
fwiw. So that extra function there isn't going to help.
Robby
On Sun, Jan 8, 2012 at 2:23 PM, Jordan Schatz wrote:
> This code runs,
This code runs, but I'm guessing that its not the "right way" to do it.
(define (js-date [i (current-date)])
(let ([original-format (date-display-format)]
[return ((λ ()
(date-display-format 'rfc2822)
(date->string i #t)))])
(date-display-for
6 matches
Mail list logo