4 ms·
The tradition of async programming goes back much further back than JS. Doing async I/O — usually referred to as event-driven programming — has been a popular t
by atombender 3y ago
The tradition of async programming goes back much further back than JS. Doing async I/O — usually referred to as event-driven programming — has been a popular technique in C and C++ for decades, with epoll(), kqueue, libevent/libev/libuv, Boost Asio, ASE, and so on. A lot of modern C software is built on async I/O, notably projects like Nginx, Memcached, Tor, Chrome, ntp, Redis, etc.
- munificent 3y ago> has been a popular technique in C and C++ for decades, with epoll(), kqueue, libevent/libev/libuv, Boost Asio, ASE, and so on. JavaScript is older than all of those. (Libuv in particular was harvested from Node, which was itself built on top of JavaScript.) Obviously JS didn't invent callback-based async IO, but I think you're forgetting how old JS is and how relatively new that style of IO is.
- atombender 3y agoThis thread is about async/await, which was added to JavaScript in 2017. Before then, async programming was only done with Node.js (unless you consider windows.setTimeout() to be "event-driven programming"), which came out in 2009. Event-driven programming was an established paradigm years before then.
- munificent 3y ago> This thread is about async/await, which was added to JavaScript in 2017. The article is about async/await, but the comments I'm replying to seem to be about asynchronous programming in general. JS was doing async for many years before async/await was added.
- atombender 3y agoNobody was doing async JS before Node, which came long after async I/O was an established paradigm.
- munificent 3y agoXMLHttpRequest shipped in 1999. AJAX was coined in 2005. The "A" in "AJAX" is for "asynchronous".
- atombender 3y agoXMLHttpRequest may be async, but it's not an asynchronous programming model.