hi everyone! i have a question regarding the remov...
# announcements
u
hi everyone! i have a question regarding the removal of type parameters from objects in 1.4: what is the reasoning there, and what is the suggested replacement?
a
No type parameters on objects? On
object …
declarations? I hadn’t seen a mention of it, but why would you want them?
u
Well, they were deprecated in 1.3, and removed now with 1.4-M1. We used them for creating instances of interfaces with type parameters in line. Maybe that code should just be moved to a class, then...
l
You can just have the member functions of the object have type parameters.
u
@louiscad that is a good idea, but if the object needs to inherit from an interface with type parameters, that is unfortunately not sufficient
l
An object can still inherit an interface with typed parameters so long you specify the type parameter.
u
What do you mean specifically? I can specialise the generic type parameter, but that doesn't help here
I have solved this now btw by factoring out several classes instead of creating them in-line with object