Personalized Syntax: [was Dependence on Programming Experts]

Geoff Canyon geoffc at inspiredlogic.com
Tue Jul 18 11:21:41 EDT 2006


On Jul 17, 2006, at 7:23 AM, Rob Cozens wrote:

> Hi Geoff,
>
>> I think the key for something like this will be when we move  
>> beyond what could be described as "keyboard shortcuts," and into  
>> something that can only be described as enhanced syntax, i.e.  
>> something that actually changes the way you think when you program.
>
> I might have said "lets you program the way you think" rather than  
> "changes the way you think when you program".
>
> Efforts aimed at either objective are somewhat limited, as any  
> construct  created must ultimately be convertable to existing  
> Revolution syntax,

The fact that it must eventually translate to Transcript (I refuse to  
give up that term) only enters into it if the resulting Transcript is  
too slow. _Anything_ can be translated to Transcript, it's just that  
some things can't translate efficiently.

To give an example of what I'm thinking of, consider associative  
arrays. If Transcript didn't support them natively, you _could_  
implement them, correct? It would be terribly slow, though, so from  
that standpoint this is a poor example.

Now consider the problem where you have a long list and you want to  
find a count of each item. Many people reading this are already  
thinking something like:

repeat for each item i in tList
   add 1 to tListCount[i]
end repeat

If Transcript didn't have associative arrays, you certainly wouldn't  
program them just to support something like this. But given that we  
do have associative arrays, you use the above code instead of  
something much more complex.

That would be my goal if I were writing extensions to Transcript: to  
create language extensions that don't just translate abbreviation X  
into expansion Y, but instead improve the richness and expressiveness  
of Transcript such that when faced with a programming challenge, your  
thought process is simplified.

gc



More information about the use-livecode mailing list