News for hackers. Stuff that matters.
Re:Safe and efficient C++ interoperability via non-escapable... by johnisgood on Thursday November 14, 2024 @10:56AM (#42137469)
Yeah I have read this not long ago, it is a great post.

> A different approach to type checking is required to fix it.

I agree, are they actively working on this though?

Re:Safe and efficient C++ interoperability via non-escapable... by int_19h on Thursday November 14, 2024 @12:34PM (#42138709)
I don't see what they can do about this in general, short of requiring sufficient explicit type annotations to mitigate the combinatorial explosion of possible combinations. But if that is an acceptable solution, you can already add such annotations to your code regardless.

C# actually has a similar issue with lambdas passed to generic functions, for similar reasons. It's just what you get when you combine overload resolution with type inference.