Ok so I'm learning C++ right now but I also want to code Gmod, so my question is are lua and C++ the same, similar or completely different. Also which is easier to learn? And can I put liam into c++
Lua is definitely easier.
Both languages mainly support an imperative programming paradigm, that will make it easier to understand either language if you know the other.
Lua also supports a object oriented programming paradigm, which is pretty prevalent in C++, but it works differently.
Lua's syntax is quite different from C++, but that shouldn't be much of an obstacle.
Lua is dynamically typed, which means that variables do not have an explicit type. This gives the language a different feel and opens some possibilities, but you also shouldn't have much of a problem dealing with this.
One thing to look out for is that while C++ arrays are 0-based (first element is element 0), Lua array are 1-based (first element is element 1).
Lua is definitely easier to learn than C++, because Lua is designed to be a small (but still powerful) language.
C++ is sometimes referred to as bloated, because it just is a big language, with some convoluted features and some quirks you have to be aware of. But you don't need to know the whole language to code a program; you can start small and work your way up.
[QUOTE=ZeekyHBomb;40969232]Both languages mainly support an imperative programming paradigm, that will make it easier to understand either language if you know the other.
Lua also supports a object oriented programming paradigm, which is pretty prevalent in C++, but it works differently.
Lua's syntax is quite different from C++, but that shouldn't be much of an obstacle.
Lua is dynamically typed, which means that variables do not have an explicit type. This gives the language a different feel and opens some possibilities, but you also shouldn't have much of a problem dealing with this.
One thing to look out for is that while C++ arrays are 0-based (first element is element 0), Lua array are 1-based (first element is element 1).
Lua is definitely easier to learn than C++, because Lua is designed to be a small (but still powerful) language.
C++ is sometimes referred to as bloated, because it just is a big language, with some convoluted features and some quirks you have to be aware of. But you don't need to know the whole language to code a program; you can start small and work your way up.[/QUOTE]
Thankyou for the help, could you recommend to me a good site to start learning Lua and maybe some book?
[url=http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&field-keywords=Programming+in+Lua&rh=n%3A283155%2Ck%3AProgramming+in+Lua]Programming in Lua V2 or V3[/url]
I always used the [url=http://www.lua.org/manual/5.2/manual.html]language reference[/url], but it's probably unwise to use it if you don't know any programming language to start with.
Maybe you can find something in the [url=http://www.lua.org/docs.html#books]official books section[/url], but I can't recommend you anything specific.
Then you can always compile using LOVE!
C++ also has a place in gmod too, so don't count that out.
Sorry, you need to Log In to post a reply to this thread.