Comment by awesome_dude
2 months ago
Another data point has just arisen - I have a function (in Go) that accepts an unpacked slice of `interface{}` (some people will now call that an unpacked slice of `any`)
I was calling that function with an unpacked slice of string - eg
```Go
foo := []string{"one", "two", "three"}
bar(foo...)
```
The AI I was using (Claude for the purposes of this discussion) incorrectly told me that I first needed to convert the slice of string to a slice of interface before calling the function
It argued with me when I said that I didn't and demanded I TIAS to prove its point, and report the compile time errors
Of course, I did, and there were no errors
The issue was that the AI (Claude) did not understand that `interface{}` or `any` means that any type can be used there.
Claude is doing a fantastic job, but this is an example of it not actually understanding what's happening.
No comments yet
Contribute on Hacker News ↗