LUA: The way to go? + Difference scripting/programming

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Chosen++
Posts: 6
Joined: Tue Jun 21, 2011 6:34 pm UTC

LUA: The way to go? + Difference scripting/programming

Postby Chosen++ » Thu Jun 30, 2011 2:51 pm UTC

I've started programming about three months ago, without really thinking about what language(s) to chose, what is easy and best to start with, how applicable they are to various things... I just chose C++ because it was famous. However, I've been thinking and doing some research. Apparently, C++ is one of the hardest languages to learn for a beginner (this should've been obvious, but I had no prior experience). So I started searching some more.

Then, I stumbled across LUA. People claim it's (relatively) simple, free, and fast. I am willing to believe the latter two, and the first one seems very probable, judging from some snippets of code I've analysed in LUA tutorials. However, I don't have any experience whatsoever, or at least not about LUA.

So, is there anybody that can tell me if LUA is the way to go as an beginning programmer? I am still going to learn C++ later, though. Also, does anyone know the difference between a programming and a scripting language? Thanks in advance.

'); DROP TABLE users;
Posts: 90
Joined: Fri Apr 22, 2011 11:44 am UTC

Re: LUA: The way to go? + Difference scripting/programming

Postby '); DROP TABLE users; » Thu Jun 30, 2011 7:09 pm UTC

I've never used Lua, so I can't comment on that. You will certainly make things easier on yourself by picking a less complex language than C++ though, at least while you're learning programming concepts. The best language to pick probably depends on what you want to do with it.

As for scripting vs. programming, you'll probably get different answers depending on who you ask. Scripting has traditionally considered to be writing code to control an existing application (or applications), and programming languages would be what you use to create applications. But in reality, the terms have been abused a fair bit and I wouldn't worry too much about it. I've also heard scripting vs. programming used to describe languages which are compiled vs. languages which are interpreted. The important thing really is to pick a language which meets your requirements.

Edit:

If you're looking for something to learn to ease your way into C++, you might want to take a look at Java. The two have a lot of features in common (Java derives a lot of its syntax from C++, but is simpler overall).

Turtlewing
Posts: 236
Joined: Tue Nov 03, 2009 5:22 pm UTC

Re: LUA: The way to go? + Difference scripting/programming

Postby Turtlewing » Thu Jun 30, 2011 7:20 pm UTC

Lua is a nice language (my favorite when the project doesn't have a bias towards some other languages feature set). I can't think of any reason why it would be a bad language to learn on.

Moving from Lua to C/C++ will be harder than going the other way, but that's mostly just because C++ give you less in the training wheels department (and C even more so).

As to programming languages vs scripting languages:

Scripting languages are a specific type of programming language which usually prioritizes ease of writing/reading code over performance, and is designed to be run inside another program (usually without compiling the script ahead of time). They tend to have weaker typing than lower level languages like C/C++, often have features like built in garbage collection, and a focus on creating bindings between the scripting environment and the host program (so you could call a C function you wrote from a Lua script for example). Typically the point of a scripting language is to provide an way to quickly change parts of a program (like the level layout of a video game) without having to recompile the program.

User avatar
Jave D
chavey-dee
Posts: 1042
Joined: Mon Oct 18, 2010 4:41 pm UTC

Re: LUA: The way to go? + Difference scripting/programming

Postby Jave D » Fri Jul 01, 2011 4:17 pm UTC

I'm a total novice at programming; however, I do recall some amount of working with LUA scripts when I was making mods for Homeworld 2. As a scripting language it seems to have fewer applications and is more narrow in scope, but what it does it does seem pretty effective.

I tried to learn programming with C# and found it all to be way too much of a much. I dove into Python recently and am currently learning programming concepts that eluded me for years. With C-type languages I think beginners get stuck in the ugly semantics; I certainly did.

shane-m-pelletier
Posts: 4
Joined: Tue Jun 28, 2011 11:20 pm UTC

Re: LUA: The way to go? + Difference scripting/programming

Postby shane-m-pelletier » Sat Jul 02, 2011 4:39 pm UTC

Lua is pretty much the standard for scripting in indie games (from what I've seen) so if you want to be a scripter for most indie games, you need to know a bit of Lua.

User avatar
RoadieRich
The Black Hand
Posts: 1037
Joined: Tue Feb 12, 2008 11:40 am UTC
Location: Behind you

Re: LUA: The way to go? + Difference scripting/programming

Postby RoadieRich » Sun Jul 03, 2011 12:06 am UTC

Not just indie: WoW addons are written in it.
73, de KE8BSL loc EN26.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 4 guests