Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's kinda nice when you want to, say, name a list "list" despite there being a list function. But I agree, it isn't super important.


The thing is that Lisp-1 doesn't prevent you from naming a variable lisp; you may then have a problem if you try to use the list function in the same scope.

It is a very important issue, because it interacts with hygiene in the face of macros.

Lisp-1 dialects, and more broadly, single namespace languages, require hygienic macros if they have a macro system.

Hygienic macros systems are gross; not everyone likes their complexity. They have referential transparency comes at the cost of sacrificing implementation transparency.

A user of a Lisp-2 language can pretend that hygienic macros don['t exist, and be happy for the rest of their days.

The reason is that if you do this in a Lisp-2, you're safe:

   (let ((list '(1 2 3))
     (opaque-macro list))
Suppose opaque-macro has an expansion which contains (list ...) calls. Those are unaffected by the variable. opaque-macro would cause a problem if it tried to bind a variable called list. That is taken care of in unhygienic macro programming by using explicit gensyms.

There could be a problem if there was a list variable that opaque-macro's expansion depends on. For that we have (1) nameing conventions like *list* for varaibles and (2) package system: macros coming from a foobar library, such that the variable they reference is foobar::list, unrelated to the user's (let ((list ...))).

The whole Lisp-2 + unnhygienic macros (+ packages) is easy to work with and understand, simple and pragmatic.


I think you have it backwards. That's why you'd want a Lisp-2 over a Lisp-1.


That's what I was describing, yes.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: