Hey,
I program mostly in C++ but wanted to grasp a new language and decided it could be Lua with an implementation in Garry's Mod to make everything increasingly more enjoyable to learn. I understand that Lua 5.1 is used in Garry's Mod and I found the references manual here: [url]https://www.lua.org/manual/5.1/manual.html[/url]
I'm wondering if it's okay to learn 5.3 even though Garry's Mod utilizes 5.1? Will there be a big difference or should I stick to 5.1 and go through the reference manual?
Thank you. :smile:
Not really, most of the changes to Lua in 5.2 and 5.3 were C++ side stuff that you don't need to worry about. Things you might want to care about:
*tostring is implemented differently, it will occasionally give you 2.0 where you expected 2. You should be using string.format() anyway.
*5.3 supports operators for bitwise or and bitwise and
*some globals (like _ENV) are functions in 5.1 (setfenv, getfenv)
It's also worth noteing gmod makes use of LuaJIT, so all those quirks from PUCRio lua apply as well
[QUOTE=Apickx;50679651]Not really, most of the changes to Lua in 5.2 and 5.3 were C++ side stuff that you don't need to worry about. Things you might want to care about:
*tostring is implemented differently, it will occasionally give you 2.0 where you expected 2. You should be using string.format() anyway.
*5.3 supports operators for bitwise or and bitwise and
*some globals (like _ENV) are functions in 5.1 (setfenv, getfenv)
It's also worth noteing gmod makes use of LuaJIT, so all those quirks from PUCRio lua apply as well[/QUOTE]
Thanks for your input, I'll learn 5.3 and adapt to the changes afterwards when I progress to Garry's Mod and 5.1.
It's worth mentioning that most projects that implement lua use 5.1
Sorry, you need to Log In to post a reply to this thread.