Hacker News new | ask | show | jobs
by bigChris 1456 days ago
Copilot works well for human readable languages languages like python; JavaScript(web framework)

If I start coding in Haskell, C and Objective-c to hack my iPhone. Guess what. Copilot stops helping or just recommends the same arbitrary genetic ideas I can google myself.

For python and JavaScript? It seems to do really well at predicting the next function and ideas.

6 comments

It's good, but as a Rubyist, I find it generally picks the most common solution to problems rather than the best one. Get it to tally the contents of a hash, for example, and it doesn't reach for Hash#tally at all, but the long "manual" way of doing it. So it makes me wonder if I'm encountering a Gell-Mann type effect with languages I'm less familiar with..
I've noticed this too, but working with pandas and python for data related things. it almost always produces non-optimal code that is surprisingly popular- just the other day it wanted to make a copy of a large file instead of a view. turns out a lot of beginner courses don't teach about copy vs view because they use small toy datasets and its not a problem. also, this throws a warning too!
Surprisingly, Copilot worked well with Clojure when I tried it. I don't know if it's because most lisps are very similar, so it borrows a lot of code from other languages while just changing the variable names, but seemed to have worked fine.

More advanced ideas obviously resulted in trash code or sometimes slightly broken one, but for simple stuff and boilerplate editing, it did well.

Just like having the copilot fly the plane ;)
Could it be that it just hadn't seen enough (Haskell) training data. The amount of code in it is tiny compared to Python, JavaScript and Java.

So even the AI struggles to learn it. :p

I can say that it works very well with Rust
Go worked quite well…
it's over for esoteric functional programming languages