Why do people choose LUA?

Out of pure interest, I’m simply wondering, why LUA, when in all seriousness, learning something a little more… powerful and mature but also similarly simple, aka PHP, has the potential to go far further and earn you some money; unlike gamemodes/lua (well, maybe temporarily, but it’s not a job replacement :P)?

Just wondering really, I knew PHP, HTML, CSS and MySQL long before LUA and have been doing freelance work on and off LUA has reduced this because, for a while at least, LUA was fun; it was great “making games”. Although now I’ve returned to my love of PHP and almost passed on all my code so I can concentrate on… bigger things :wink:

So yeah, why LUA?

Lua is a very modular and easy to manipulate language, and probably is one of the easiest languages to learn.

Yeah, but so is PHP (well, it’s almost as easy).

But PHP isn’t capable of being modified on a per engine basis, as opposed to Lua which can be changed and adjusted to be hard coded into any application.

Exactly what Nerdboy is saying.

I just wish I could learn lua D:

Oh and I bet I’ll get some boxes for saying this.

I learned Lua as my first language and it took less than 2 weeks to start writing scripts without constantly referencing online books.
I’ve been trying to learn C++ for over 4 months and I haven’t gotten to that point yet.

Lua is an easy language to learn, i have already picked up basic Derma and basic Lua commands in less than a week, I’m finding it easy to work with and good fun, especially when you get the results you want out of the code :smiley:

Because I’m currently playing Garry’s Mod, which happens to have a Lua implementation, rather than a PHP one.


Why are you breathing oxygen, when there are far more prevalent gasses available, like nitrogen?

Garry should consider fixing that mistake, Lua is the name of the programming language and means “moon” in portuguese, if I remember correctly, it’s not an acronym.

You like PHP for a reason, I guess that’s because you are making web development, other people like C++, because they create applications. Lua is a really convenient scripting language because it runs pretty fast and is very simple to learn and understand. Many games use it, Garry’s Mod is not the only one.

PHP is the most messy scripting language I know so far (Luckily PHP 6 shall get consistency) - I’m talking about mixed up function arguments and redundancy. So that you know what I mean. Lua has less potential of couse than PHP but a MUCH better consistency. But of couse, you can extend Lua to have all functionality PHP has. Just a matter of time.
And HTML and CSS are just markup. No real programming. And SQL is just a “command like” language, to tell the database what to do.

Lua is quite fast and constantly in development/bugfixing. Other languages, such as GameMonkey are quite stagnating concerning the development status.
Anyway, garry wrote on his blog, that he won’t chose Lua again for newer projects. It seems like being a mess adding binds between Lua<->C++. For his “new engine” he has chosen Goodles V8 JavaScript engine. (More to read here).

Well yes, you can be totally incosistent in your code in PHP, and it works, I personally prefer that, programmers just choose which way they code stuff, although it can be annoying at times. Of course, I suppose Lua will eventually be able to keep up with the variety of PHP. However, my point is that from a personal gain point of view, as in, money, PHP would be the far better choice.

You came into a Garry’s Mod Lua scripting forum and asked the question why we use Lua?

We didn’t have a choice.

For the same reason people choose to eat carrot cake, drive blue cars, drink a brand of soda, or cut their hair in certain ways.

Although we didn’t have much choice in what we use to script ( all or nothing ), its just because the people want to.

You can learn as many languages as you want. Companies don’t usually give a crap about weather you get money from other sources when coding in a different language. Why should they change from, say, js to cscript only because somple employee makes money off of cscript in a different job?

Well, you could download Wampserver/Mamp and start punching out PHP easily enough, unless you specifically wanted to code for GarrysMod. My questions is more that than specifically Lua, I expect many people chose Lua because they wanted to code for GMod, so my question should be slightly modified:

Why GMod over other things?

What makes you think gmod is the only concern to everyone in this forum?

I do nothing with Lua outside Garry’s Mod.

I learned PHP/Javascript to develop web applications, I learned C/C++/C# to develop computer applications, etc…

It’s simple really. Learn languages required to perform tasks you have a need for. You pose the question why not learn PHP? If someone doesn’t write web applications, whats the point?

I meant for people who start off with GMod, did they look at other programming options, or were they purley looking for GMod specifically because they want to change this or make that?

What else is Lua used for anyway?

The only thing I’ve heard/uses of lua is Garry’s Mod. Nothing more.