Re: Comments on draft #3 Marc Nieper-Wißkirchen 02 May 2020 21:07 UTC

Am Mo., 27. Apr. 2020 um 07:50 Uhr schrieb Marc Nieper-Wißkirchen


> Could you explain in more detail what efficiency problems you see with
> defaults and why they couldn't be handled by the implementation?

Did you get this message? I am really interested to know why you think
defaults can have efficiency issues.

What I can deliver is a macro, say DEFINE*, through which one can
define a procedure taking optional arguments and optional keyword
arguments (after all optionals are given), which has no runtime
overhead compared to a procedure taking no optional arguments and no
optional keyword arguments as long as keywords are given in the form

The macro will have to depend on identifier macros (otherwise we
wouldn't be able to pass around the defined "procedure"). However,
identifier macros should be almost trivial to implement in any Scheme
expander, while it is much harder to implement an optimizer that can
optimize such calls.