Sort:  

I don't think a simple bit of programming logic is analogous to an emotion. But I think you are linking suffering to emotion - which is interesting to note.
It does get philosophical of course, but the distinctions are important.