Hm, this discussion is getting off track, perhaps we should have it in person
tomorrow. I'll try to give some replies below, but I'm getting the feeling we
are talking past each other.
Regardless of the below, I want to make sure that the knowledge about prefixes
and the formatting of IDs in general is encapsulated in a way that allows us to
easily change or extend it later. That code should be the only place where the
question whether the prefixes are configurable is relevant.
Essentially, I fear that it's a bad idea to hard code the assumption that
prefixes are not configurable. This can be knowledge in a few pieces of code,
but should not be an assumption throughout the code base.
Am 25.08.2013 18:45, schrieb Jeroen De Dauw:
Hey,
... database ... schema ... serialization ...
This change has zero impact on our database schema or on how we index
things based on entity ids. That is an entirely different topic.
To me it sounded like you suggested to use the prefixed form in the database
too. But that's not my main point. My point was that if we use two separate
field in the database, it's probably more sensible to use this form in PHP too,
rather than to convert back and forth all the time.
See the code ;) Serialization was already encapsulated, so only some local
changes are needed for this. Users in general do not know about the db
serialization format.
The serialization format is an external, canonical representation. The
database form is internal and may change. Isn't that the reason we also
have two JSON representations for entities?
What are you asking or stating? Is your second question here related to
your first? Are you simply trying to state some things by asking rhetorical
questions? Something else entirely?
It was a rhetorical question making the point that a format that is good as an
external, canonical form is not automatically the right choice for the internal
representation.
-- daniel
_______________________________________________
Wikidata-tech mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech