Chapter 17Threads, Promises, and Futures

One of the things that makes programming such a challenge is that many of our sharpest tools are also our most dangerous weapons. Having functional values means that we can deliver a little package of code to the right place at the right time. But functional values also separate the action from the source code in a way that can make it hard to debug your program. In the same spirit, lazy sequences are wonderful, except for those infuriating times when you forget that your sequence is indeed lazy. But nothing can compare to the potential for both good and evil that comes with the thread. Having your program do several things at once is a boon: Hey, I can do all these jobs at the same time! But it’s also ...

Get Getting Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.