[plt-scheme] apply vs dot notation syntax

kbohdan at mail.ru kbohdan at mail.ru
Sun Oct 5 06:35:02 EDT 2008


Hi all,

Probably it was discussed ages ago but could not find any links
regarding the following question.
Why scheme has 'apply' primitive instead of simple dot
notation ? i.e. we can use

(f arg1 arg2 . rest-of-args-list)

instead of standard:

(apply f arg1 arg2 rest-of-args-list)

The former looks similar to the 'define' syntax
and has advantage to be processed by a compiler
in some special way. For example, optimizer can remove
some unused arguments. Doing the same optimization with
standard approach looks unnatural from the compiler design
perspective : compiler [lower layer] should know about function 
primitives [higher level].

Thanks.

--
Bohdan




More information about the plt-scheme mailing list