News for hackers. Stuff that matters.
Re:Mezzano: Operating system written in Common Lisp by moonchild on Sunday February 07, 2021 @03:33AM (#26053591)
It doesn't. Common lisp is a lisp-2, which means that there are 2 namespaces: one for functions and one for variables. (Technically there are quite a bit more, but that's beside the point.)

Which means that you can do this:

  (let ((- 5)) ; bind the '-' variable to 5
    (-         ; call the '-' function
      -        ; on the '-' variable
      17))     ; and the number 17
               ; this evaluates to -12
Re:Mezzano: Operating system written in Common Lisp by kazinator on Sunday February 07, 2021 @04:16AM (#26053746)
This is a non-issue for all Lisps, not all of which are Lisp-2.

Your code doesn't seem like a very good idea, even though it is legal.

Re:Mezzano: Operating system written in Common Lisp by moonchild on Sunday February 07, 2021 @01:09PM (#26056783)
> Your code doesn't seem like a very good idea

Why not?

I usually use an 'anaphoric if' macro that binds - to the given value. It seems more clearly 'special' than a name like 'it'—which seems like the canonical name—closer to the perl/raku $_.

Re:Mezzano: Operating system written in Common Lisp by ScottBurson on Sunday February 07, 2021 @04:13AM (#26053729)
You can. But you shouldn't :-)
Re:Mezzano: Operating system written in Common Lisp by lispm on Sunday February 07, 2021 @04:32AM (#26053806)
this is also possible...

  CL-USER 5 > (- 1 2 3 4 (third -))
  -10