Ask HN: ChatGPT best programming language to use?
If you are going to ask ChatGPT to write code, which programming language would you ask it to use and why?
I had thought maybe rust, but I read some threads and people were stating the code it writes would not compile sometimes.
11 comments
[ 2.9 ms ] story [ 29.1 ms ] threadThe training set likely contains more JavaScript than any other language, so the resulting code quality would probably be the best, but JavaScript is also the most tolerant mainstream language and would tolerate a lot of runtime errors.
I think this is where trial and error comes into play. If GPT makes up a crate for, say, an HTTP server, and the API is very close to a real HTTP server, then it's not a big deal. You can just swap in a crate you know works.
If GPT is making up a crate and also mangling the use of such a crate, then it's probably not worth the human effort to fix all of that.
The same is true with any language: you'd have to try it a few times to decide if it's even worth the time saved.
Copilot is probably a better product for coding regardless, although I think it's deeply unethical and hope it gets sued out of existence.
I wonder if that's because it's not weighting by recency in it's training or something.
[1] https://openai.com/blog/openai-codex