Carsillas
❔ AllOf<>? Something along the same lines as discriminated unions?
It will work yes but it's pretty stinky for users of the library to have to create a new class for every different kind of variable they want, as if generics don't exist
Even if the only user of the library is me haha
74 replies
❔ AllOf<>? Something along the same lines as discriminated unions?
It's not a huge deal it's just inconsistent with my other API, but maybe it should be?
Basically it's a networking library and I can have networked variables like
int
and string
but I wanted a way to replicate references to the network entities themselves, so I planned on having a class that was generic in a way that you could specify the types of classes that were allowed in that property, but using just an interface breaks the serializer because it doesn't know about the network ID that exists on the network entity class74 replies