thiemowmde added a comment.

"Fully" initialized might be a confusing term we want to avoid.

For now we have Lexeme::isSufficientlyInitialized, which could act as the counter-part to one of the static constructors from the proposal above. We can think of naming one newSufficientlyInitialized or similar. This constructor will give the guarantee that isSufficientlyInitialized is true (and always will be, because none of the critical fields can be set back to null, including the ID).

However, I strongly suggest to not make this discussion more complicated by considering all entity types. There is no technical need to make them identical, and no need to add more guarantees to the EntityDocument interface. The Item and Property constructors are like they are for a long time now, and we never felt the urge to change them. This is different for Lexeme because it is new, and going to have a lot more parameters.


TASK DETAIL
https://phabricator.wikimedia.org/T162809

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: gerritbot, Jakob_WMDE, Ladsgroup, Lydia_Pintscher, daniel, Aleksey_WMDE, Jonas, WMDE-leszek, thiemowmde, Aklapper, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, Izno, Wikidata-bugs, aude, Darkdadaah, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to