Functional Programming and Promises

Callbacks are imperative, promises are functional: Node’s biggest missed opportunity

A nice post about functional programming and promises. Promises are interesting concept, and it would be a powerful tool to assist the concurrent programming.

However, I still feel the Node’s callback-based model is a reasonable approach to lower the thresholds of event-based concurrent programming. Having the compact first-class functions, the most of the expressions are concise, compared with heavy-weight languages like Java.

I’m now learning the Futures and Promises on Scala, but I’m having difficulties on grasping its programming style. It requires abstracted ways of thinking, and I’m struggling. Need more study.

Posted on November 22, 2013, in JavaScript, Web. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: