Am 13.06.2013 06:38, schrieb Jeroen De Dauw:
Hey,
Putting the DataType id in PropertyValueSnaks at this point seems like a bad idea for several reasons. Doing so would cost us quite some work end end up with a more complicated system as foundation.
Changing it now would be hard.
But I think it would have been simpler and cleaner if we had gone that route from the start.
Why would it be a bad idea? To me, it's just a self-contained data structure that knows it's own type, as it should.
If you have a use case for which the current code is not well suited, I suggest writing new code for that specific use case. I strongly suspect this will both be simpler and less work.
Any code I can write for this now will involve injecting knowledge about properties into the snaks post-hoc. That's going to suck.
I remember a lengthy discussion about this, but I don't recall the outcome (yes, we really need to write this stuff down).
There was no decision at any point to change this, though it indeed has been brought up before.
Well, at some point, the decision was made, right? Was it disucssed? Were the implications of each approach compared? Is this documented somewhere?
I recall a lengthy skype call with Markus and Denny about this, and I *seem* to recall that we decided to store the type in the snaks - but as too often, i don't think this is documented anywhere.
So, what's the point of whining now, since it's too late anyway? I'd like to understand the rationale for going with the current system. And I would like to make the case for more communication and documentation about design decisions like this. Especially since anything concerning the internal data tsructure that goes into the DB is very hard to change later.
-- daniel