Case in point, this article about asynchronous code patterns in node.js. Go ahead, read it.
Now here's the thing. If you read that code, the first version, the synchronous version, is comprehensible. The final version, an asynchronous version that actually works and handles exceptions rationally - well, you can understand it given the presentation, but I defy you to run across that in the wild and tell me what it does, clearly, without the need for fifteen minutes of error-prone thought.
Macros help us get around that. If we think of that final pattern as the compiled version of whatever concept we're trying to express, then it's a lot more palatable. And that's why a universal macro language like Declarative is going to be really useful for a lot of different things.
No comments:
Post a Comment