Why did LibreCAD choose Lua for its scripting interface?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why did LibreCAD choose Lua for its scripting interface?

justinnoor
This is not meant to start a flame war - it is a sincere technical inquiry about the advantages of using Lua over other scripting languages for LibreCAD’s scripting interface.

Why did LibreCAD choose Lua? Did it consider other scripting languages? Why were those languages declined?
Reply | Threaded
Open this post in threaded view
|

Re: Why did LibreCAD choose Lua for its scripting interface?

R. van Twisk
Administrator
For the LibreCAD 2 version we don't have an official scripting language so I assume that you are asking about LibreCAD 3.

There where 2 main reasons to pick Lua over Python:

- I don't know Python so when I had to make a decision on what scripting language to use I used Lua because I have had played around with that already... Mainly X-Plane.

- On a technical level, Lua is VERY easy to add to a C++ codebase and this included proper garbage collection handling.

That said, we are fortunately not limited to Lua. Anybody, even you could add the properr build scripts to add a Python interface. At the timeI have played around with swig but didn't found it that easy to generate stable builds with that. I see now that Swig supports Lua aswell, but I am not sure anymore if at the time this was also true...

On a personal level : Python (as a java/c++ developer) as a odd-ball I never really understand It and I just find it awkward to do anything with it . I need to keep 'googling' to do the most basic stuff with it... It's just not my thing... note: I am even faster doing things in Node than python... and I really don't like javascript!!!
Reply | Threaded
Open this post in threaded view
|

Re: Why did LibreCAD choose Lua for its scripting interface?

justinnoor
Great answer - thank you so much. Now I’m curious about Lua!