What is "Open Language"?

Peter TB Brett peter.brett at livecode.com
Sat Oct 24 21:17:54 EDT 2015


On 2015-10-25 00:19, Monte Goulding wrote:
>> On 25 Oct 2015, at 9:05 am, Geoff Canyon <gcanyon at gmail.com> wrote:
>> 
>> The beauty of open language (in my dreams, perhaps not the spec) would 
>> be
>> that:
>> 
>> 1. No one would have to dig into the engine to implement something 
>> like
>> this.
>> 2. You could release your "counter" version, I could release my 
>> "index"
>> version, and the community would decide which they prefer and go with 
>> that.
>> (or both).
>> 3. And neither 1 nor 2 precludes something like this achieving 
>> critical
>> mass such that the engine maintainers decide to put it in the engine
>> directly.
> 
> OK, well we can let Mark Waddingham comment on whether I’m right in
> that control structures are unlikely targets for open language or not.
> It seems quite unlikely to me as it’s significantly more complicated
> than commands. I’m not saying it’s not possible the ROI would be
> terrible. As in almost 0 return for a reasonably heavy investment…

I can't speak for Mark, but from my point of view, Open Language without 
custom control structures would be woefully incomplete.

For example, "with" blocks would be super awesome:

     with the defaultFolder as "/home/peter/foo/bar"
         -- Do things that might cause an error
     end with

Syntax is purely demonstrative, but the idea is that no matter what 
happens inside the block (return, error, etc.) the defaultFolder would 
get restored to its original value.  Far easier to get right than "try 
... catch" for cleanup purposes.

"Match" blocks would be really nice to have too.  Also, I can think of 
lots of uses for custom control structures in making test suites easier 
to write.  And about 10 other really neat applications.

So yes, custom control structures are a really important part of Open 
Language from my perspective.  You could make it far easier to write 
correct code.

                                        Peter

-- 
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Open Source Team

LiveCode on reddit! <https://reddit.com/r/livecode>




More information about the use-livecode mailing list