4 ms·
It certainly is subjective. This is where AppleScript really fell down--English is inverted, but typical programming starts with a noun then does a verb to it.
by ryanianian 4y ago
It certainly is subjective. This is where AppleScript really fell down--English is inverted, but typical programming starts with a noun then does a verb to it.
Given it's written <verb> <noun> (toggle a on x) rather than <noun> <verb> (x.toggle(a)), I don't see how you can know the space of verbs the noun will accept without perhaps starting with a guess and then seeing what the tool provides or something? I get it's more constrained than AppleTalk, but does that actually solve the issue in practice?
- recursivedoubts 4y agoI think the fact that the language is designed to be embedded on elements makes it clear that the implicit subject and object is the current element (the "me" or "I" symbol in hyperscript <div _="on mousenter toggle .expand" ...> ... </div> So the language comes across as imperative statements, with the current element being the default subject and object, as with english instructions. Most commands (statements) accept a noun target: <div _="on mousenter toggle .expand on the closest <section/>" ...> ... </div> But, due to the embedded nature of the language it still comes across as you telling the diff to toggle the class on the other section. There is also a tell command that allows you to switch the default object (which you can access explicitly in the "you" and "yourself" symbols: <div _="on mousenter tell the closest <section/> toggle .expand" ...> ... </div> Insanity, I know. There are also three, count'em three different ways to access properties: set x to arr.length set y to the arr's length set z to the length of the array Fun! Also insane. But also fun!