Interesting wordOffset behavior
Richard Gaskin
ambassador at fourthworld.com
Tue Dec 4 11:04:09 EST 2012
Peter M. Brigham wrote:
> Probably Richard Gaskin can tell us the history behind this,
> clearly a leftover from HC.
No doubt. I got nothing on this one specifically, other than the
precedence order Alex noted.
While this is a common side-effect of a flexible left-to-right parser,
easily made more precise with parens, I do find that most of the
head-scratchers in the language were holdovers from the HyperTalk era.
For all their reputation of having crafted something remembered as being
"easy to use", the HyperTalk team's frequent exceptions to their own
rules have led to years of confusion in every dialect that's adopted them.
My personal favorite example is allowing property syntax for functions
(e.g., "the acos of <number>" vs. "acos(<number>)"), but LiveCode is not
without its own unique anomalies, like the "destroyStack" property which
doesn't actually destroy the stack at all, or the "delete stack" command
which does two very different things depending on whether it's used on a
mainStack or a substack.
xTalks are funky this way. Thankfully they provide enough utility to
more than make up for the unnecessarily difficult learning curve.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list