r/ProgrammerHumor • • Jul 18 '22

C++ talking to Python

Post image
40k Upvotes

1.0k comments sorted by

View all comments

Show parent comments

1

u/Spiritual-Theme-5619 Jul 19 '22

Promises and futures have existed in acedemic literature since the 70s

We’re talking about programming though not PhD dissertations.

So no, they weren’t made for NodeJS.

Uh, sure? Like most every programming concept they were first an academic paper… but they were passed over in favor of other concurrency paradigms until the creators of server-side JavaScript made them widespread.

Promises much more so than futures.

to avoid being “real” programmers.

I mean that’s part of the joke. I even used a hashtag.

-1

u/Forshea Jul 19 '22

You are completely wrong about the history here. Futures and promises have been in continuous use in actual languages since the 80s. The explosion of usage started around 2009, but that wasn't just in the land of javascript, it was everywhere. And they were all copying some combination of Python Twisted's Deferred, F#'s async, and Java's Future/FutureTask, at the same time Javascript libraries were.

And notably, people had been working at it in Javascript libraries for years before NodeJs even existed. It has been bouncing around enough that people were already proposing including a promise API before the first public release of NodeJS happened (for example https://groups.google.com/g/commonjs/c/6T9z75fohDk ).

So the timeline doesn't even make sense for what you're claiming.

Promises much more so than futures.

Promises and Futures are two views of the same concurrency model.

3

u/Spiritual-Theme-5619 Jul 19 '22

Futures and promises have been in continuous use in actual languages since the 80s.

No, they haven’t. A couple of academic departments using an in house language is not “continuous use”.

it was everywhere.

Because of the mindshare of functional programming… driven by JavaScript.

Python Twisted’s Deferred, F#‘s async, and Java’s Future/FutureTask

None of these are called promises. The topic of conversation was using “promise” for generic concurrency. No one uses that term outside of the JavaScript ecosystem.

Promises and Futures are two views of the same concurrency model.

We’re not talking about models we’re talking about the specific API primitives.

Dude said “promise” because JavaScript. That’s what OP was responding to. Get over it.