Martin Atkins (mart) wrote in lj_dev,
Martin Atkins
mart
lj_dev

User/UserLite Equality

At the moment all of the S2 layers are checking the equality of users by comparing usernames. However, usernames aren't really so unique anymore. In future, they'll get even less unique as we start supporting multiple namespaces etc.

My proposal is simple. Include the userid in a hidden member in UserLite (not accessible from S2 code) and provide a builtin function equals(UserLite other) which returns true if the userids match or false otherwise.

If we do this now it'll reduce the number of layers that have to be changed later.

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments