News for hackers. Stuff that matters.
Re:Vala Programming Language by adhesive_wombat on Saturday July 16, 2022 @08:44AM (#32117475)
Periods are in struct.member identifiers and also in floating points. Using them again for end of statement would be complicated[1].

Imagine that your statements are "x = y.x = z." The compiler needs to figure out if that middle dot is saying "x member of y" or if it's a statement terminator.

[1]: It's already complicated by that reuse, which is, I assume, why identifiers can't start with digits so your parser can be simpler.

Re:Vala Programming Language by xigoi on Saturday July 16, 2022 @09:14AM (#32117693)
I assume that the statement terminator was chosen first, so they could've used something else for member access, such as `\`. Though I don't know about floats.
Re:Vala Programming Language by yissp on Saturday July 16, 2022 @09:51AM (#32118077)
They could have used a comma for floats, as is common in many non-English-speaking countries. Although I guess that might become ambiguous with its use as a parameter separator.