JeroenDeDauw added a comment. @daniel: I do not see how we need to be "adding a second, rather complex, data model on top of the core data model". For the example provided, having a serialization of a property value snak with added data type, all you need is a simple typed snak object. One such value object is neither complex nor a duplication of the whole model, and much less icky than introducing interfaces for non-serialization services in a serialization component.
> Sure, code that relies on modes and switches is annoying. And serializers > should be dumb. But if upholding these principles 100% causes a lot of > overhead, we should probably go for a balance point closer to the energetic > minimum... I'm not sure if that is meant to be a reply to anything I said. Just in case: I agree switches are not nice though that the most pragmatic trade-of will probably involve some. In fact, there already is one: https://github.com/wmde/WikibaseDataModelSerialization/blob/master/src/SerializerFactory.php#L50 TASK DETAIL https://phabricator.wikimedia.org/T73170 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: JeroenDeDauw Cc: JeroenDeDauw, thiemowmde, Bene, Wikidata-bugs, Tobi_WMDE_SW, JanZerebecki, adrianheine, Lydia_Pintscher, daniel, aude _______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
