How I can keep aggregate initialization while also adding custom constructors?
You can’t have your cake and eat it too. If the object has a constructor it is no longer an aggregate, and only aggregates can be initialized with designated initializers. You can’t use constructors for arbitrary initialization logic with aggregates. Are we toasted though? No, because there’s the “named constructor” idiom. It’s essentially just a … Read more