What is "Open Language"?
Mark Waddingham
mark at livecode.com
Mon Oct 26 11:40:05 EDT 2015
On 2015-10-24 22:55, JB wrote:
> If you do get Open Language what will it do to the
> speed? They said LC8 would be good because it
> will make it easier for developers to write code in
> LC which needed to be and external before.
We're still working on the 'foreign function interface' in LCB, so it is
not yet as mature as we would like. The benefits of doing it from LCB
rather than in C is that you don't have to deal with C compilers,
toolchains and IDEs. (This is particularly pertinent if you are wanting
to wrap an existing library which you don't have to compile yourself!).
> Then after releasing it they said it is slower to use
> than a external written in C.
Given that most OS APIs do quite heavyweight things execution speed is
not really a concern. After all, if you are asking the OS 'please render
this PDF page here', then it matters not one iota what the cost of
abstraction is to call that OS supplied rendering function - it will
always be orders of magnitude less than rasterizing millions of pixels.
In most cases, I think you'll generally find that speed of writing code
for these kind of things is much more important than the speed of the
bit which marshals things appropriately to call the API.
Now, that is not to say that speed of LiveCode Builder is not important
to us - because it critically is. We are designing the language to try
and ensure that it can be compiled and run at speeds which are not too
dissimilar to native code in the future - this is why variables are
typed, type conversions are more strict and handler calls are 'static'
(not determined at runtime) rather than dynamic.
Indeed, the plan is that LiveCode Script (as it is now) and LiveCode
Builder will eventually sit atop the *same* underlying bytecode-based VM
so both can benefit from a native compilation strategy (probably based
on LLVM). The *difference* is that the scope of optimization of LiveCode
Script will be a great deal less than that for LiveCode Builder due to
its dynamic design and use.
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list