* Re: [Guile-commits] GNU Guile branch, wip-compiler, updated. v2.1.0-139-gf8a333e
[not found] <E1Rb2fT-00087o-2c@vcs.savannah.gnu.org>
@ 2011-12-18 23:46 ` Ludovic Courtès
2011-12-25 15:05 ` Noah Lavine
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2011-12-18 23:46 UTC (permalink / raw)
To: Noah Lavine; +Cc: guile-devel
Hi Noah,
Just a few superficial stylistic comments until I have something more
clever to say: ;-)
"Noah Lavine" <nlavine@haverford.edu> skribis:
> (define default-environment
> - `( (cons . ,(value-set-with-values 'cons))
> - (car . ,(value-set-with-values 'car))
> - (cdr . ,(value-set-with-values 'cdr))
> + `( (cons . ,(value-set-with-values prim-cons))
> + (car . ,(value-set-with-values prim-car ))
> + (cdr . ,(value-set-with-values prim-cdr ))
> ))
Please avoid trailing closing parenthesis.
Also, what about “vset” or just “set” instead of “value-set”?
> + (set! (a-verify-exps ret)
> + (map (lambda (x) (rec ret x env)) args))
> + ret))
Please privilege a functional style, as much as possible (in some cases
we lack the tools to do better, so that’s fine.)
> +(pass-if "value-set-can-be-anything?"
> + (value-set-can-be-anything? anything))
In Emacs you can (put 'pass-if 'scheme-indent-function 1) to get the
“right” indentation.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Guile-commits] GNU Guile branch, wip-compiler, updated. v2.1.0-139-gf8a333e
2011-12-18 23:46 ` [Guile-commits] GNU Guile branch, wip-compiler, updated. v2.1.0-139-gf8a333e Ludovic Courtès
@ 2011-12-25 15:05 ` Noah Lavine
0 siblings, 0 replies; 2+ messages in thread
From: Noah Lavine @ 2011-12-25 15:05 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
Hello,
Sorry it's been so long since my last reply. I've been somewhat busy
around the holidays, but I hope to work more soon.
> Also, what about “vset” or just “set” instead of “value-set”?
Yes, probably a good idea.
>> + (set! (a-verify-exps ret)
>> + (map (lambda (x) (rec ret x env)) args))
>> + ret))
>
> Please privilege a functional style, as much as possible (in some cases
> we lack the tools to do better, so that’s fine.)
I don't think there's a functional way to do this, although I could be
wrong. What I want to do is make a structure where the child tree
nodes are linked to their parents. I can't get the address of the
parent until after I allocate it, so I allocate it with an empty list
of children, then use its address to make the list of children that I
want.
Another approach would be to make the list of children before
allocating the parent, but then I would have to go back and fix up
their 'parent' pointers. So I think either way I'm stuck doing some
mutation.
>> +(pass-if "value-set-can-be-anything?"
>> + (value-set-can-be-anything? anything))
>
> In Emacs you can (put 'pass-if 'scheme-indent-function 1) to get the
> “right” indentation.
Ah, thanks. Done.
Noah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-25 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1Rb2fT-00087o-2c@vcs.savannah.gnu.org>
2011-12-18 23:46 ` [Guile-commits] GNU Guile branch, wip-compiler, updated. v2.1.0-139-gf8a333e Ludovic Courtès
2011-12-25 15:05 ` Noah Lavine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).