Hacker News new | ask | show | jobs
by moonchild 1934 days ago
> I don't get lisp's (lisp-2) dynamic scoping

I don't know about elisp, but common lisp uses primarily lexical scoping. If you ignore ‘defparameter’/‘defvar’, then you'll be living exclusively in lexical scoping land.

> I'd like to have macros. I wonder if R7RS has macros

R7RS only specifies hygienic macros, but unhygienic macros are a commonly implemented extension. They aren't present in chibi scheme, but you find chicken scheme[0] or s7 scheme[1] interesting.

0. https://www.call-cc.org/

1. https://ccrma.stanford.edu/software/snd/snd/s7.html

2 comments

Chibi has explicit renaming macros. If you really want less hygiene than that, you can implement defmacro on top of er-macro-transformer.

Edit: er-macro-transformer IS unhygienic unless you tell it otherwise, much like gensym, except all renamed bindings introduced in the same macro invocation are the same. Gensym is of course available as well

Yeah +1. And Gambit too!