News for hackers. Stuff that matters.
Re:Reading a Programmer's Guide to Common Lisp by HexDecOctBin on Thursday February 22, 2024 @10:32AM (#39468574)
So, every other language that doesn't create a new nested scope for every consecutive group of intermediate variables is doing it wrong? Which is to say, almost every language apart from Common Lisp. Does that sound reasonable to you?
Re:Reading a Programmer's Guide to Common Lisp by kragen on Thursday February 22, 2024 @10:53AM (#39468890)
while i'm not sure lisp's approach is better in this case, i do think it's fairly common that 'almost every language apart from ... lisp' 'is doing it wrong', so i don't think that would be an unreasonable position to hold on those grounds ;)
Re:Reading a Programmer's Guide to Common Lisp by a-french-anon on Thursday February 22, 2024 @11:00AM (#39469016)
You're talking about a special operator, a language primitive. In that view, let is perfectly fine and clear. Macros are what you want if syntactic sugar is needed.
Re:Reading a Programmer's Guide to Common Lisp by medo-bear on Thursday February 22, 2024 @12:47PM (#39470547)
I'd instead point out that an appeal to majority is a basic fallacy.

edit:

Let me also add this: you cannot get away from scoping. If you create intermediate values in your language of choice you better understand the implicit (and sometimes very complicated) scoping rules of that language. All that Common Lisp does is it makes this scoping explicit.

Re:Reading a Programmer's Guide to Common Lisp by Karrot_Kream on Thursday February 22, 2024 @02:09PM (#39471588)
You've rediscovered another essential portion of Lisp: the smug lisp weenie.
Re:Reading a Programmer's Guide to Common Lisp by kazinator on Thursday February 22, 2024 @05:06PM (#39473977)
> So, every other language that doesn't create a new nested scope for every consecutive group of intermediate variables is doing it wrong?

In my opinion, it is a giant, flaming misfeature.

> Which is to say, almost every language apart from Common Lisp

Algol; Ada; Modula 1, 2, and 3; Oberon; Eiffel; ...