Comment

Comment by chmod775

Hilarious. The code "fix" Copilot suggests in their example[1] is wrong on some many levels. It's trying to use await in something that is not an async function. From the other examples it's clear this is likely React's useEffect. You could not even make that callback an async function if you wanted to - this naive fix for that leads to subtle bugs.

And last but not least: The issue here - if there's any - can already be caught by linter rules like no-floating-promises in eslint/by using TypeScript instead. You don't need a shitty AI linter confidently suggesting wrong code.

That's how you advertise the product? I'm guessing competent coders at GitHub have already been replaced by juniors+copilot.

[1] https://i.imgur.com/FHnsqyP.png

parent chmod775 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton