I'm trying to reduce boilerplate when creating an ...
# getting-started
r
I'm trying to reduce boilerplate when creating an object as a subtype of an abstract class, with arbitrary fields, and can't work it out 🧵
My current code looks like this:
I feel I should be able to reduce it to something like this, using extension methods and a `PropertyDelegateProvider`:
But I'm not sure it's possible to declare the fields of the subclass like this!
Using the code here I can do this, which is quite close to what I want. I'm pleasantly surprised that
flat_subjects.subject_id
compiles! I expected it would have lost the anonymous inner object's fields by returning it from a function.