Re:_hyperscript: A jQuery and JavaScript Alternative
by deniz-a on Thursday April 22, 2021 @06:15AM
(#26900977)
Thankfully, we have arithmetic expressions :]
Every command has an initial verb, which makes parsing easier (both by computer, and hopefully by people). Just for fun, here are your examples in hyperscript:
get numA / numB then put it into resDiv
-- or simply
set resDiv to numA / numB
repeat 5 times index loopCount
log loopCount
end
My immediate reaction was "Oh, web Cobol".
Edit: By the downvotes, I'm guessing people think it was a lazy attempt to poke fun. It's not though :) Cobol has a very repeated VERB->NOUN->ADVERB->ETC sentence style pattern that's very similar to what's in that snippet of _hyperscript above. Like:
DIVIDE NUMA BY NUMB GIVING RES-DIV
PERFORM VARYING LoopCount FROM 1 BY 1 UNTIL LoopCount GREATER THAN 4
And so on...