3 ms·
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
by undershirt 11y 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.
- seivan 11y agoSorta like signals using RxJS/RxSwift.
- hellofunk 11y agoOne 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.
- bearfrieze 11y agoAuthor here. Thanks for this brilliant comment. May the force be with you.