• lua=C++?
    19 replies, posted
Isn't LUA similar to C++, but easier, shorter, and you don't need a compiler?
Lua is written in C, still needs a compiler/interpreter, and is meant to be a [url=http://en.wikipedia.org/wiki/Scripting_language]scripting language[/url]. In short, it's not meant to be compared against C++.
[QUOTE=Megiddo;16273574]Lua is written in C, still needs a compiler/interpreter, and is meant to be a [url=http://en.wikipedia.org/wiki/Scripting_language]scripting language[/url]. In short, it's not meant to be compared against C++.[/QUOTE] But you can't deny there are quite a few similarities can you?
[QUOTE=Anti-Flag;16273654]But you can't deny there are quite a few similarities can you?[/QUOTE] Barely. About all they have in common is Lua's optional semicolons and garry manually adding C-style operators and comments. They aren't really similar beyond being programming/scripting languages.
No they aren't similar. One is an interpreted scripting language aimed to be high level (more like English) and the other is a powerful low level compiled language which gives you direct access to memory management. Lua is more like other scripting languages I think, such as Python. In games scripting languages are usually interfaced to an engine using a more low level and complex language (such as in Gmod's lua is an interface to the source engine which is C++.)
ok shut the fuck up and stop replying to this thread i don't need your life story
[QUOTE=Anti-Flag;16277743]ok shut the fuck up and stop replying to this thread i don't need your life story[/QUOTE] My, my. A bit testy. C++ and Lua are alike in the sense that they are both languages, otherwise they are drastically different. To make such an oblivious comparison should be after you experience *cough*learn*cough* both languages instead of simply making an assumption. Garry's Mod in itself is a compiler in scope of Lua, but otherwise how would you go about running a Lua application? Have you even considered that all a .lua file is is blatantly a .txt file in disguise? It can do nothing on its own because a computer cannot understand our words until they are boiled down to what they mean. (Binary, my boy.)
[QUOTE=Anti-Flag;16277743]ok shut the fuck up and stop replying to this thread i don't need your life story[/QUOTE] Wow, anger problem? As the others have said GMod Lua is very high level. It a couple similarities but is a whole lot easier to read, execute, debug. More so like a BASIC (i.e. VisualBasic/REALbasic but not compiled)
So in short, we can say that Lua != C++. Or should I say ~=?
[QUOTE=TehBigA;16279233]Wow, anger problem? As the others have said GMod Lua is very high level. It a couple similarities but is a whole lot easier to read, execute, debug. More so like a BASIC (i.e. VisualBasic/REALbasic but not compiled)[/QUOTE] I would say VB / RealBasic is one step up the ladder from lua. They are both even more basic.
!= [editline]02:14PM[/editline] In response to this. [QUOTE=yakahughes;16284351]So in short, we can say that Lua != C++. Or should I say ~=?[/QUOTE]
Well I had (Life story) a class that had C++ and JAVA and when I did C++ I didn't notice too many similarities, obviosly there are similarities between most codes (at least something), but JAVA was much more similar to Lua than C++. At least it helped me learn it better. However, I had some sort of different JAVA and it wasnt the one that (at least to me) looked like HTML.
[QUOTE=Kalik 911;16291582]However, I had some sort of different JAVA and it wasnt the one that (at least to me) looked like HTML.[/QUOTE] Do you mean JavaScript?
[QUOTE=Emz;16277223]No they aren't similar. One is an interpreted scripting language aimed to be high level (more like English) and the other is a powerful low level compiled language which gives you direct access to memory management. Lua is more like other scripting languages I think, such as Python. In games scripting languages are usually interfaced to an engine using a more low level and complex language (such as in Gmod's lua is an interface to the source engine which is C++.)[/QUOTE] Actually, Lua is not interpretive, it just doesn't have its own external compiler. GMod Lua is compiled by GMod every time the script is loaded, which is why many times large lua-heavy addons can take longer to load than the model-heavy addons. :eng101: [quote=GMod Wiki]Lua is a versatile programming language with a simple syntax. Although many people consider Lua to be an interpretive language this is incorrect as Lua compiles its scripts when they are loaded. Because Lua can easily be embedded into applications, it is frequently used in games, such as World of Warcraft, Far Cry and Baldur's Gate.[/quote]
[QUOTE=Skyhawk;16292525]Actually, Lua is not interpretive, it just doesn't have its own external compiler. GMod Lua is compiled by GMod every time the script is loaded, which is why many times large lua-heavy addons can take longer to load than the model-heavy addons. :eng101:[/QUOTE] Lua can be interpreted at run-time or pre-compiled. There is a Lua compiler. You can compile one with the default sources from Lua.org
[QUOTE=Anti-Flag;16277743]ok shut the fuck up and stop replying to this thread i don't need your life story[/QUOTE] Wow. What a dickhead.
let me put it simply: C++ != Lua. Lua ~= C++
[QUOTE=avwos;16304133]Wow. What a dickhead.[/QUOTE] I think you mean average facepunch user.
[QUOTE=TehBigA;16302571]Lua can be interpreted at run-time or pre-compiled. There is a Lua compiler. You can compile one with the default sources from Lua.org[/QUOTE] Sorry, should have said GMod Lua, not Lua in general. GMod Lua is compiled temporarily when the scripts are loaded.
[QUOTE=Salads;16327878]I think you mean average facepunch user.[/QUOTE] Maybe not average, but he does represents a large proportion of the facepunch posters.
Sorry, you need to Log In to post a reply to this thread.