I was reading on terralang site about terra language as
"a new low-level system programming language that is designed to interoperate seamlessly with the Lua programming language..."
Zach DeVito (the main author) write about the use of terra :
A scripting-language with high-performance extensions.....
An embedded JIT-compiler for building languages.....
A stand-alone low-level language....
But (may be my fault) I don't understand if terra is:
Can someone help me to better understand what is going on terralang project ?
Thanks
But (may be my fault) I don't understand if terra is: a luaJit competitor
It is not. It is built on top of LuaJIT and LLVM. LuaJIT is written by Mike Pall and LLVM is written by Apple and the community. It can do two things.
1) It adds extra language syntax (dubbed Terra) to your Lua code. In this way, you can mix Lua code with hard core low level code with great ease.
2) It allows you to generate fast code at runtime. Great if you want to create new languages, compilers or generate fast machine code without all the work normally associated with this.
a better system to interface with c library
Yes and No. If all you want to do is call existing C or other native libraries from Lua, I recommend using LuaJIT as is. Mike Pall has done a fantastic job at this and a lot of the C integration magic comes from LuaJITs FFI. But if you need to create new "C like" code mixed together with your Lua program, Terra is nice. You have a dynamic language / status language hybrid.
something better than luaJit using llvm
No, Lua code is still evaluated using LuaJIT and Terra code uses LLVM.
Terra is fantastic, I can really recommend it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With