News for hackers. Stuff that matters.
Re:I Still ‘Lisp’ (and You Should Too) by packetlost on Monday February 20, 2023 @10:36AM (#34869070)
Agreed. Metaprogramming does have it's place in languages like Lisp where it removes boilerplate or hides details that other programmers likely don't need/want to think about. However it's easy to go too far, which is really what I'm talking about. I think as long as you have first-class and variadic functions you can probably live without macros for like 98% of cases without compromising on readability (as is the case with Python). Alternatively, if you have an easy way to, at develop/compile time, identify exactly what a macro/metaprogram is doing I think it's ok, but that is subject to tooling.
Re:I Still ‘Lisp’ (and You Should Too) by kazinator on Monday February 20, 2023 @12:43PM (#34870544)
Python acquires new macros in its parser. For instance, it now has pattern-matching macros which weren't there before. A few years ago it got a f'...' reader macro which wasn't there before.
Re:I Still ‘Lisp’ (and You Should Too) by packetlost on Monday February 20, 2023 @02:17PM (#34871643)
Sure, but Python doesn't let users write their own macros
Re:I Still ‘Lisp’ (and You Should Too) by kazinator on Monday February 20, 2023 @02:24PM (#34871750)
So if you're on an older Python, you can't backport the new syntax; you're forced to upgrade if you have some code which depends on it. In Lisp, if some code we would like to use depends on some newer macros offered by the Lisp dialect we are using, but we cannot move to a newer installation yet, we may be able to backport just the macros into our program.

You're stuck with the ill-designed crap that Python puts out. For instance, I don't agree with pattern matching that assigns to existing variables; from where I'm sitting, it looks like an incompetent clusterfuck. If someone did that in one Lisp program, the entire language would be blamed for allowing that sort of "curse".