Open Cokemonkey11 opened 3 years ago
Yes, the way that I would imagine it is:
Workaround for current Wurst: Without type classes, you could pass a destroy function as a parameter.
Thanks @peq. I wonder if it makes sense to implement destroy
for native types with no-op, so that destroy
is globally implemented trait. That would be a nice stop-gap before new generics
That would not help without new generics. With current generics, T
is erased and there is just an int
. So destroy would always be a no-op for generic types, which would be very confusing.
So @peq, your new job is very boring and you will definitely spend some time on wurst soon, right? 🙃
Is this something that new generics can help with?