reason for "eval" in net-barchart.scm
Rob Browning
rlb@defaultvalue.org
Thu, 27 Sep 2001 00:38:34 -0500
Robert Graham Merkel <rgmerk@mira.net> writes:
> The value returned from an option generated by this function is a symbol
> corresponding to the "deltas" in src/app-utils/date-utilities.scm - not the
> actual delta structure itself.
>
> Hence, the use of eval to get the structure from the symbol.
>
> I dunno, how do you want to fix this?
Hmm. If we need the eval, that's fine, but from what I've seen, I
think I'd prefer an alist defined after all the delta functions:
(define foo-deltas
`((SecDelta . ,SecDelta)
(DayDelta . ,DayDelta)
...))
and then instead of eval, we can use an assq-ref on the alist. We
might also want to put a comment wherever the items are added to the
multichoice indicating that you need to update the alist too...
Note that if we do leave the eval, I'll need to figure out what works
across the various guiles. Before 1.6, eval took one arg, but now it
takes two to conform with r5rs. I believe that primitive-eval retains
the old semantics.
Thanks
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD