Writing 107 as a sum improves readability. Also, it reminds that sometimes value to be stored (0) must be changed -- for example, if body is stored in a reference.
https://ton.org/docs/develop/smart-contracts/messages
Indeed, in the elector code above we serialize coins' amounts via .store_coins(grams) but then just put a string of zeros with length equal to 1 + 4 + 4 + 64 + 32 + 1 + 1. What is it?
First bit stands for empty extra-currencies dictionary. Then we have two 4-bit long fields. They encode 0 as VarUInteger 16. In fact, since ihr_fee and fwd_fee will be overwritten, we may as well put there zeroes. Then we put zero to created_lt and created_at fields. Those fields will be overwritten as well; however, in contrast to fees, these fields have a fixed length and are thus encoded as 64- and 32-bit long strings. (we had alredy serialized the message header and passed to init/body at that moment) Next zero-bit means that there is no init field. The last zero-bit means that msg_body will be serialized in-place. After that, message body (with arbitrary layout) is encoded.
Yes, the two lines of code are equivalent in terms of their output. Both lines store the value 107
as an unsigned integer with a bit size of 8.
The reason why the first line was written with the + operator is likely for clarity or readability. Breaking down the value 107 into its component parts and adding them together may have been intended to make the code more self-explanatory or easier to understand.
There may be other reasons why the first line of code was written that way, such as compatibility with other parts of the codebase or consistency with existing coding conventions, but without further context it's difficult to say for certain.