3 ms·
> But we are not allowed to convert the interface into that type. Instead, we can convert it into a pointer to that type. I don't quite follow this "problem" -
by pbnjay 13y ago
> But we are not allowed to convert the interface into that type. Instead, we can convert it into a pointer to that type.
I don't quite follow this "problem" - it sounds like a complaint about the lack of generics. I haven't been programming in Go for long, but I found the reflection system pretty easy to use and it basically allows you to do this.
Sure, it's not EXACTLY the same, but in what case do I actually need a float or integer instead of an interface method that acts on them in the way I expect?