The selectedObjects - is it a container or not?

Richard Gaskin ambassador at fourthworld.com
Wed Apr 19 12:58:16 EDT 2017


Graham Samuel wrote:

 > I know really that the ‘the’ indicates a function...

The use of "the" for both properties and some (but not all) functions is 
among the few mistakes the original HyerTalk team made.

If "the" were used exclusively for properties, there would be no 
confusing ambiguity.

Worse, using it for functions only works with a subset of functions 
where the number of params is 0 or 1, but not two or more.

And while we can use "the" with a subset of built-in functions, we can't 
with custom functions.

Lots of "sometimes" rules were introduced as by-products of that design 
decision, making the learning curve more steep even as it attempts to 
lower it.

LiveCode has little choice but to follow the established convention, 
butt when I teach newcomers I never even show them that "the" can 
sometimes be used for functions.


 > ...but at the same time it’s kind of a trap within the idea that
 > LC scripting is “English-like".

HyperTalk was once arguably "English-like" back when the alternatives 
were C and Pascal.  When it premiered there were very few scripting 
languages; among the few in widespread use was bash, which is wonderful 
but sparse, and thus not very readable.

Today, scripting languages have followed Osterhout's prediction from the 
'90s to become a leading means of developing applications.

One of the key goals of any scripting language is to provide readable 
code.  Ruby, and maybe more so Lua, are nearly on par with LiveCode for 
readability when we compare professionally-written production code.

E.g. this:

   put arrayEncode( the customProperties["Prefs"] of stack "Prefs" ) \
      into url ("binfile:"& specialFolderPath("Preferences") & \
      "/MyPrefs.dat" )

...is readable enough, but far from English.

What LiveCode brings to the modern world is a high-level scripting 
language distinguished not by any conformance to the rules of English, 
but by being among the very few that include support for GUI controls as 
inherent language elements.

With LiveCode, that occurs across a platform coverage that I don't 
believe any other scripting language with integrated GUI support offers.

-- 
  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