Elektrine lite

← Feed

@witchgirls@woof.tech

Post #4140178

2026-07-27 15:22 UTC

@lisyarus@mastodon.gamedev.place Most programming languages have expression statements: statements that are just a blank expression. Like, 3 + 3; is valid syntax in a lot of languages. These are what make multi-line no-semicolon syntax ambiguous, because let x = 10 - 1 could be let x = 10 - 1; or let x = 10; - 1; but if "- 1;" is not a valid statement (because expression statements are forbidden) then the only valid interpretation is 10 - 1.

Replies (1)

  • @witchgirls@woof.tech Ah, yes. In my example above "-1" would be an expression statement. I can't not have that because they can contain function calls with side effects

    Open ##4141538