Thomas Steiner (@tomayac)

Now at @tomayac@toot.cafe

The below is an off-site archive of all tweets posted by @tomayac ever

June 24th, 2021

Thanks for the replies, I know how to make it work, just wondering if it could/should work as in the tweet above. Someone actually has built an async version of the Array functions: https://t.co/7VbptW3Riv.

via Twitter Web App

@jaffathecake Yeah, fully agree it could be dangerous. I wonder if asyncSort, asyncMap, asyncFilter,… etc. methods were ever discussed as convenience patterns.

via Twitter for iPhone in reply to jaffathecake

@rauschma It was obviously spec’ed in a synchronous world, but it doesn’t complain either. Engines l@v8jsv8js don’t refuse to run the sort function.

via Twitter for iPhone in reply to rauschma

It’s an admittedly very weird corner case, but should this work?

“`js
const promiseArray = [Promise.resolve(3), Promise.resolve(1), Promise.resolve(2)];

promiseArray.sort(async (a, b) => await b - await a);
“`

Spoiler: it doesn’t work, but should it?

via Twitter Web App

Google announces a 5G smartphone targeting India that shall be affordable for “all”. I wonder what this means for the smart feature phone form factor. I can also imagine this will make designing for low-RAM, modest-powered CPU devices even more import

via Twitter for iPhone

RT @jaffathecake: 🔝 In JS functions, which return wins? I’m going to try and convince you it’s the ‘last’ one.

h/t to @littledan for point…

via Echofon