>>>> "Karl" == Karl M Hegbloom
<karlheg(a)inetarena.com> writes:
Karl> I've given the `cond' special form the r{4,5}rs scheme-style
`=>'
Karl> syntax. It's working, when the test code is run interpreted, but not
Karl> when run byte-compiled.
Changing a subr that has its own bytecode is at least twice as hard as
changing one that doesn't.
Karl> Attached is the simple test code followed by my first C code patch to
Karl> XEmacs. (not counting typos in docstrings or comments.)
Karl> My question is: Should the byte compiler be compiling `cond' like
Karl> that, since it's in C already? Wouldn't it run faster if it only
Karl> translated things like the anonymous lambda, and left the rest for
Karl> the C code to run?
It's reasonable for it do SOMETHING, e.g. at least check for syntactic
correctness:
(cond ((t . t)))
=> Argument list must be nil-terminated: t
This is something the subr has to check for that the generated
bytecode doesn't, because the byte-compiler checked it at compile time.
Martin