Hacker News new | ask | show | jobs
by elcritch 1511 days ago
I've run into the "cannot instantiate 'V'" somewhat regularly. Generally it means the compiler doesn't have enough info and defaults to trying to use `V` as a concrete type.

Generally it's not usually an issue with Nim's generics itself, but rather bad error message. Definitely an area for improvement IMHO. Though having used a fair bit of C++ templates over the years, I still find the Nim errors much more tractable after a bit of experience.

There _are_ a few broken limits of Nim's generics, but they are things pushing the type system to a limit.