Hacker News new | ask | show | jobs
by undershirt 3743 days ago
I don't think the author realizes how appropriate the Jedi tone for this article is. Comprehensions are the gateway drug to the dark side, away from imperative programming and toward languages that treat everything as expressions which snap together more freely. It hints at an idea of making a `for` loop and an `if` statement return a value (see CoffeeScript). But it also hints at the idea that useful idioms like the List Comprehension can merge/simplify existing constructs into a new, easier syntax-- and that there are languages that allow you to do this freely (see Lisp).

Python showed me the Force, but I'm with the Dark Side now.

3 comments

One of the most extraordinary APIs for comprehensions can be found in Clojure, where the "for" expression really changed how I view data. A single expression can generate many complex data sequences with such elegant beauty.
Author here. Thanks for this brilliant comment. May the force be with you.
Sorta like signals using RxJS/RxSwift.