English Like?
Richard Gaskin
ambassador at fourthworld.com
Wed May 17 17:29:49 EDT 2017
William Prothero wrote:
> When Director died, I looked around, held my nose, and jumped to
> livecode, and now I’m glad I jumped that initial negative barrier.
> But, I take exception to the many claims that livecode is
> “english-like” (in spite of the many “english-like” commands),
> especially if you want to do the advanced work that most of the users
> do.
The team seems to share the same feeling; you'll find most references to
"English-like" are historical.
LiveCode is readable, almost to the point of being self-documenting, and
generally quite learnable,
But no language designed for communicating with a machine benefits much
from from attempting to follow Chomsky rules for natural/accidental
languages we use when communicating with humans; very different
cognitive abilities in the listener, very different usage goals, leading
to very different design patterns.
Your specific question is an interesting one in terms of syntax consistency:
> For example, suppose I want to do the very basic task of coding a
> conditional that test for the name of a card. What I would intuitively
> expect is:
>
> put the name of this cd into cdName
>
> What I get for cdName is: Suppose the name of the cd is theName
> card “theName”
>
> Ok, now I only want the name, so I do
>
> if word 2 of the name of this cd is “theName” then
> —do my stuff
> end if
>
> Nooooo, I don’t get that. First, I need to do:
>
> put word 2 of cdName into cdName
> replace quote with “” in cdName
> if word 2 of the name of this cd is “theName” then
> —do my stuff, this works
> end if
>
> I don’t call this intuitive. I just spent more time than I should
> have sorting this out.
I'm afraid you'll have to blame the authors of the mother tongue,
HyperTalk, on that one.
Your expectations a perfectly reasonable: with most properties we ask
for a value and we get that value, without also getting some other
metadata like object type.
Imagine if:
put the rect of button 1
...returned:
rectangle "20,20,120,44"
That would be annoying as hell. And yet with object names that's pretty
much what happens, where we have to add more (an extra keyword) to get less:
put the name of button 1
...yields:
button "Bob"
But:
put the short name of button 1
...yields:
Bob
Fortunately most properties work as expected, and the anomalous behavior
of the name property (and only a few others) are easily learned and
quite useful.
But posts like yours are VERY helpful for those of us who teach
newcomers. When we've learned these things too long ago it's easy to
forget they were ever unintuitive at first, which may miss opportunities
for more effective on-boarding.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list