• Languages close to Lua
    17 replies, posted
I am trying to teach one of my friends to program. He has no programming experience whatsoever and I wanted to start him off with something easy. He plays Gmod constantly and and wants to learn Lua. Should I just help him learn Lua or start off with Liberty BASIC, or something similar, and work our way up? Any language close to Lua or BASIC you guys recommend? He can learn stuff well, but I think starting off with C or C++ would kill him.
Teach him lua
It depends on what he is interested in making.
Ruby is pretty close to lua and there's an (excellent) [url=http://tryruby.org/]in-browser tutorial for the ruby basics.[/url]
A lot of people start off with Python or Ruby, but I'm not a fan of either really. It might be best just to teach him Lua, really. The GMod version is pretty straight forward and easy to understand - I've taught people the basics of it who don't know anything about programming in just a short amount of time.
php is like lua
Perl is kinda similar, but the syntax is a little unconventional compared to most other scripting languages.
JavaScript is probably the closest. Simple types, first-class functions, prototype-based programming.
Gmod Lua would probably be the way to go, because coding with it provides more interesting effects as opposed to something else not 3d or game related. It's simply much easier to learn when you're making something you're interested in. Gmod Lua also has a massive amount of example code to learn from because of all of the things people have made and released. Speaking as a person who learned Lua as his first language I can vouch that your effort gives you something more substantial than for example Python where making a database would mean nothing beyond having a database instead of for example having a way to track player's stats on your server. TL;DR: Lua is more fun.
[QUOTE=Grea$eMonkey;29556060]Perl is kinda similar, but the syntax is a little unconventional compared to most other scripting languages.[/QUOTE] I can't really see any similarities between lua and Perl. After all, Perl uses the C syntax which already differs a lot, not to mention the variable types. And the syntax is more or less what defines a language, in my humble opinion.
[QUOTE=Zaubermuffin;29556750]I can't really see any similarities between lua and Perl. After all, Perl uses the C syntax which already differs a lot, not to mention the variable types. And the syntax is more or less what defines a language, in my humble opinion.[/QUOTE] When I say similar, I meant that while I was learning it there were a lot of little quirks that reminded me of Lua. The syntax is vastly different, but it's that charming simplicity of it that made it seem similar to me.
If he wants to learn Lua, I think he should just learn Lua right away. It's the easiest and most painless way.
In general, I don't think people should start with languages. If you want to learn and be good at it, you should start with logic. Once you have your programming logic fundamentals down you can learn any language you want. It's just a matter of memorizing/learning the syntax.
[QUOTE=Overv;29556971]If he wants to learn Lua, I think he should just learn Lua right away. It's the easiest and most painless way.[/QUOTE] This. If he *struggles* while learning another language, what he's learnt will impede his progress in learning lua.
[QUOTE=thejjokerr;29557070]Though having a language to "fool around with" might help you understand logic better. Allowing to trial and error, predict what might happen and if it doesn't happen evaluate what was wrong in your way of thinking.[/QUOTE] Yes and no. Logic isn't ambiguous - that's why it's called logic. It's good to have a language to learn alongside it. I use codepad.org for testing vanilla code. I agree with Overv that Lua is a great language to start with, but learning GMod Lua to start with isn't always a good idea since it's so easy to try and bite off more than you can chew.
I lent him a "Beginning Programming for Dummies" book and think that would help alot with the logic used in coding. Is there any tuts (books, videos) that you guys would recommend?
[QUOTE=MissingLynx P.;29595732]I lent him a "Beginning Programming for Dummies" book and think that would help alot with the logic used in coding. Is there any tuts (books, videos) that you guys would recommend?[/QUOTE] I'd recommend practice. I've only ever read a couple of books, and honestly they're only useful if they document functions (which you can find online anyway) Though [url]http://cplusplus.com/[/url] has a good tutorial.
Sorry, you need to Log In to post a reply to this thread.