News for hackers. Stuff that matters.
Re:Reading a Programmer's Guide to Common Lisp by kragen on Thursday February 22, 2024 @10:51AM (#39468861)
i'm not sure it's correct to say that lisp's 01959 approach to defining variables is a 'confusing break from conventions' established by c, which originated in 01972 but didn't support 'sticking variable definitions anywhere' until 01999 with the 01999 revision of the iso c standard. i would rather say that sticking variable declarations anywhere, a feature i believe was introduced to the mainstream by c++ around 01990, was the break from conventions. almost all the languages i'm familiar with from before that required you to batch up local variable declarations at the tops of scopes: c, smalltalk, pascal, scheme

the exception is basic, where you could defint i or dim x(128) at any point, but it would be an understatement to say that basic's conventions were not widely emulated by other languages

Re:Reading a Programmer's Guide to Common Lisp by kragen on Thursday February 22, 2024 @01:25PM (#39471035)
also basic variables are global. most of these languages let you create global variables anywhere, or at least anywhere outside of a subroutine
Re:Reading a Programmer's Guide to Common Lisp by gknoy on Thursday February 22, 2024 @01:26PM (#39471046)
I hope this doesn't derail the conversation much, but I found it interesting that you seem to be using 5 digit years, a convention I've never seen before. What drives this choice?
Re:Reading a Programmer's Guide to Common Lisp by kragen on Thursday February 22, 2024 @01:57PM (#39471431)
it turns out it's sort of like wearing a mohawk. a long now mohawk. it's a completely harmless deviation from convention which provokes an amazing variety of reactions, some astonishingly aggressive, while other people react thoughtfully
Re:Reading a Programmer's Guide to Common Lisp by michael1999 on Thursday February 22, 2024 @04:17PM (#39473388)
Thank you. I hadn't drawn the parallel before. But that matches my experience with both.
Re:Reading a Programmer's Guide to Common Lisp by aap_ on Friday February 23, 2024 @04:06AM (#39478504)