Re: Lua or something else?
Posted: Sat Mar 06, 2021 10:48 am
Modders are not Wube, some can barely write lua, and you are talking about setting up cross-compilation to Mac and Linux.
Modders are not Wube, some can barely write lua, and you are talking about setting up cross-compilation to Mac and Linux.
Dealing with pointers is trivial and can be learned in 5 minutes. Memory management is pretty much always handled by the system or language libraries and most likely, would never be seen in an interpreter. Pointers can be hidden or just not used as well as shown in the implementation of C++ for the Arduino.... if you make non-programmers have to deal with pointers and memory management ...
Yes!- My prefered solution would also include to erradicate everything about lua from the internet and humanities memory.
It's written in C++. Only the modding API uses Lua.
Same.
While In haven't seriously messed with rust yet, my preferences steadily shift towards languages outright preventing certain kinds of errors and making use of the optimization opportunities gained from these restrictions. I'd love to have a C++ modding API for factorio, but due to the sandboxing, determinism and portability aspects mentioned above, I don't consider it viable.Personally, I am of the opinion that one shouldn't forego a wealth of features (such as C++'s performance) in favor of slight simplicity (not having to worry about pointers - just don't mention Lua tables - and maybe simpler syntax). If you make anything remotely complicated, you still need to learn to deal with Lua and the unexpected or tricky parts of its design. You also still need the right mindset to wrap your head around whatever you're programming, which is also not trivial if you have very little previous programming knowledge. As a result, it's just not really "beginner friendly" unless you're making something very simple.
Combined, from the view point of a modder, I don't see much of a reason to choose Lua. You could deal with the complexity of C, but you cannot deal with the performance limitations of Lua. There is a very hard line beyond which you can no longer do anything at all to improve its performance.