Re:Civet: A Superset of TypeScript
by int_19h on Tuesday October 22, 2024 @06:45PM
(#41919486)
You do it by making sequential evaluation (i.e. the semicolon, which becomes an operator in "everything is an expression" world) always produce a void result. Then you introduce the notion of terminating evaluation early and yielding a value from the compound expression - this becomes `return` (and other similar constructs like `break` and `continue`).
[ Parent
| on HN ]
Re:Civet: A Superset of TypeScript
by chrismorgan on Tuesday October 22, 2024 @10:03PM
(#41920995)
Ah yes, true, true, I had forgotten about the semicolon. Somehow. Yeah, I don’t think I’d like expression-orientation so much without it.