_hyperscript
_hyperscript copied to clipboard
[Request] provide an alternative statement separator (in addition to "then")
I know that we may separate statements by means of then (not only) if they are on the same line.
But not always there is this logical consequence which is implied by this word, like in
set x to 0 then set y to 0 then set z to 0
If we would have an alternative (e.g., ;) the above code would actually become more readable:
set x to 0; set y to 0; set z to 0
FWIW, you can put statements on the same line without any separator:
set x to 0 set y to 0 set z to 0
log x + y + z
I added some additional whitespace for readability.
We've resisted adding a semicolon terminator for a while because
- hyperscript's ancestor HyperTalk doesn't have one
- the semicolon is not used this way in natural languages
A dot statement terminator would be nice, but it would conflict with lots of things.
Oh, that#s good to know - did I miss that in the docs? Or should you mention that more explicitly (I remember, that then was specified as "optional"...