3 ms·
If we start using periods to end expressions, would we then have to use semicolons to chain things together? Or would you let the compiler know that foo.size().
by onychomys 7y ago
If we start using periods to end expressions, would we then have to use semicolons to chain things together? Or would you let the compiler know that foo.size(). was okay and that it shouldn't be waiting around for another function call there?
- lifthrasiir 7y agoJuxtaposition (`foo size()`) is a serious contender I think. In fact, I consider it is one of the most undervalued syntactic choices.
- WorldMaker 7y agoIn HS I built a toy language where it was `foo's size()`, if you want to play even further down the English-like rabbit hole, even trying to stick to BNF-ish CFGs. `'s` is actually a surprisingly unambiguous token in a language without a "char type" and that sticks to double quotes only for strings.
- marcosdumay 7y agoHum... Prolog uses periods to end declarations, and as you expect, uses semicolons as combinators. It reads really well, because it also uses colons as combinators, with higher precedence than the semicolon. But it does not map well into other paradigms.