-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jiří Zárevúcký wrote:
> You didn't understand me. I'm just talking about examples being the
> worst/most difficult to implement way imaginable. If developers really
> do implement XEPs the example way, I'm frightened by the way servers
> would implement this. If they are not, I don't see the point in making
> such crazy examples. That's all.

Just to have said it (in Pseudocode):
Variant A:
newVersion = getLargestVersionNumber() + 1;
save(newVersion, roster);

Variant B:
newVersion = sha1(roster);
if !getRoster(newVersion): // check if this roster is already saved
  save(newVersion, roster);

This is NOT way more difficult or anything. Also this is not a crazy
example. It is a GOOD idea to have one example show that ver values are
not sequential numbers. I'm not sure you'd like ver="deadbeef" (as in
neither hash nor number) better...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoLG1YACgkQ0JXcdjR+9YQNgACgpkSZ2arc/Ao9aeRxeeGzu9Gi
1V4AoI4S2L0Pb/l/Rl+3Nbqn0altAjaB
=pZ4O
-----END PGP SIGNATURE-----

Reply via email to