Closed hrumhurum closed 1 year ago
Thanks for the feedback and praise of the project - it means a lot to hear such things!
I will be explicit with the type in the first examples and will also highlight that int
is an arbitrary default and that user would probably want to change the default to suite their needs.
Maybe even have an option in the global configuration that basically fails the build if someone doesn't provide the type explicitly.
Thanks again for the feedback. I've updated the readme and added this feature request.
Just a small feedback related to first impressions. First of all, the package is pretty useful and thank you for taking your time and efforts to create it.
However, it has a drawback related to the product perception: the default
int
type of ValueObject. I mean the very first example from the home page:It presents a serious perceptional problem because it is not clear what type the resulting
CustomerId
value will have. A much better approach is to always be explicit:or
While I see where the default
int
idea came from, I want to stress that not everyone's experience revolves around integers. In database and ORM worlds maybe it isint
, but for someone else it wouldstring
, or something completely different based on a particular problem domain.I suggest to consider a possible obsolescence of
[ValueObject]
usage in favor of its explicit variants like[ValueObject(typeof(int))]
that would make Vogen approachable to everyone, out of the box.