News for hackers. Stuff that matters.
Re:How knowing Lisp destroyed my programming career (2006) by jstimpfle on Wednesday March 14, 2018 @09:03PM (#16589726)
This looks impressive on the first sight (kudos!). But on the other hand it's still a pretty fragile and unreadable macro, no? And it supports only a very limited form of list comprehensions. Can "destructuring-bind" support them fully?
Re:How knowing Lisp destroyed my programming career (2006) by vzcx on Wednesday March 14, 2018 @09:13PM (#16589779)
Yes, it is fragile (less than five minutes, man!) but hardly unreadable to the macro-accustomed eye.

A "real" implementation would do more processing of the forms in the list read by read-delimited-list and perform appropriate checks. This is more to just give you a sense of how trivial it is to extend the language.

I don't actually know python well enough (I had to look up "list comprehension") to say, but I would estimate that it would only take a page or so of code to give you something fully-featured and robust.

In practice, I would never abuse the reader like this when typical "loop" expressions are enough to do these kind of things (and more).

Re:How knowing Lisp destroyed my programming career (2006) by martinflack on Thursday March 15, 2018 @01:50PM (#16595010)
Anyone who would like to use list comprehension forms, or read about how Lisp enables them, might find these papers interesting:

Implementation of a "Lisp comprehension" macro by Guy Lapalme http://rali.iro.umontreal.ca/rali/sites/default/files/publis...

Simple and Efficient Compilation of List Comprehension in Common Lisp by Mario Latendresse http://www.ai.sri.com/~latendre/listCompFinal.pdf