News for hackers. Stuff that matters.
Re:TypeScript 5.2's New Keyword: 'using' by hungryforcodes on Monday June 19, 2023 @12:45PM (#36393195)
This is really true. I feel somehow the problem came when the functional programming gang hijacked it and forced ES6 on us. Promises were so counter intuitive they had to create shortly after async / wait...

Don't get me wrong there are alot of great things in ES6, but it was not quite the same language after...

Re:TypeScript 5.2's New Keyword: 'using' by merrywhether on Monday June 19, 2023 @01:01PM (#36393483)
> functional programming gang

This is a bit of weird assignment, given that the Class syntactic sugar over Prototype was one of the marquee features of that release.

Re:TypeScript 5.2's New Keyword: 'using' by salwadordali on Monday June 19, 2023 @12:55PM (#36393386)
How would you solve the async/await issue then? I think JS handles asynchronicity very elegantly. You just need to create a proper mental model around it. I don't want to go back to the old times of callback hell, that's for sure.
Re:TypeScript 5.2's New Keyword: 'using' by efdee on Monday June 19, 2023 @12:48PM (#36393253)
What would you prefer instead of promises? Callbacks?
Re:TypeScript 5.2's New Keyword: 'using' by manigandham on Monday June 19, 2023 @12:57PM (#36393415)
async/await and promises are both just syntax on top of yield/generators.

Most programming languages are just different syntax on top of the same core primitives.