These are not two declarations, these are two assignment operators. You are absolutely right in how this works.
The reason it works is because the assignment expression is a valid expression that produces a value. Rightmost assignment first evaluated
message.sentDate = [NSDate date]
and then the second assignment:
_conversation.lastMessageSentDate =
Please note that this is an evaluation order, not an actual assignment order: they can occur in any order, because the order of side effects is not indicated in the absence of sequence points.
source share