• Best language to learn before Lua?
    10 replies, posted
Every article I've read strongly suggests not to learn Lua first because it complicates things and makes someone with a fresh, innocent:quotes: mind like me overly confused. Any suggestions?:smile: ??
How about English?
Lua is an extremely simple first language, fuck the articles.
Lua is about as simple as it gets. You don't need to worry about "real" OO (Java) or pointer math (C++) or any of the retarded quirks that Javascript has. If you want something really easy, you could [i]try[/i] doing E2, or one of the new fangled things that replaced it, if it has a good community. E2 had a pretty stupid way of listening for events. Just beware that it could be difficult stepping up to Lua since function names will differ.
This depends what you want to do. If you want to fully understand what Lua is actually doing, then I recommend you learn C first. If you don't care how Lua works really, but just want to use it, then focus on learning just Lua. You'll have a better understanding of Lua as a whole if you learn C first, though - but it's really not necessary.
[QUOTE=ph:lxyz;50505068]This depends what you want to do. If you want to fully understand what Lua is actually doing, then I recommend you learn C first. If you don't care how Lua works really, but just want to use it, then focus on learning just Lua. You'll have a better understanding of Lua as a whole if you learn C first, though - but it's really not necessary.[/QUOTE] I will never understand why people would recommend a statically typed language to a beginner. Dynamically typed languages can better teach the principles of coding because you don't have to worry about as much as shit as you would have to in something like C. Take tables as an example. Lua doesn't give a fuck what you put in them. No lists. No dictionaries. No arrays. Just a simple box for you to put [B][I]whatever[/I][/B] inside, yet it can act like all of those, and even emulate the other Lua types. With C you have to constantly worry about types. And then there's numbers. What the fuck is an unsigned short? Beginners don't care about that sort of stuff. Lua sticks to the bare minimum. A number is just a number. It's negative, it's positive, it can be as big as most people will reasonably need. And like others have said, pointers and memory management. For the most part, you have nothing to worry about that in Lua. Lua is so braindead easy compared to other languages. Really don't know why you would recommend C. No beginner cares about what a programming language is doing. Beginners want to make things, and they want to see results immediately.
[QUOTE=man with hat;50505501]I will never understand why people would recommend a statically typed language to a beginner. Dynamically typed languages can better teach the principles of coding because you don't have to worry about as much as shit as you would have to in something like C. Take tables as an example. Lua doesn't give a fuck what you put in them. No lists. No dictionaries. No arrays. Just a simple box for you to put [B][I]whatever[/I][/B] inside, yet it can act like all of those, and even emulate the other Lua types. With C you have to constantly worry about types. And then there's numbers. What the fuck is an unsigned short? Beginners don't care about that sort of stuff. Lua sticks to the bare minimum. A number is just a number. It's negative, it's positive, it can be as big as most people will reasonably need. And like others have said, pointers and memory management. For the most part, you have nothing to worry about that in Lua. Lua is so braindead easy compared to other languages. Really don't know why you would recommend C. No beginner cares about what a programming language is doing. Beginners want to make things, and they want to see results immediately.[/QUOTE] Languages like C are small enough that someone could learn it in their spare time, and the standard library is small enough that I can keep most if it memorized. I'll admit that some of the more heavily object oriented classes get a little silly with their "finalized virtual factory class", but it's well worth the tradeoff of forcing namespaces. I'll compare Lua to JavaScript, and I think this is a very apt example, since both languages implement many of the same features. JavaScript makes it easy to start writing code, it also makes it easy to write bad code. If that wasn't bad enough, it rewards bad design just enough to imprint the programmer with bad habits. [URL="https://simpleprogrammer.com/2013/05/06/why-javascript-is-doomed/"]What[/URL]? [URL="http://james.padolsey.com/javascript/javascript-bad-practices/"]You[/URL] [URL="https://www.destroyallsoftware.com/talks/wat"]don't[/URL] [URL="http://rachelappel.com/common-javascript-mistakes-and-pitfalls-you-can-avoid/"]believe[/URL] me? Pointers are indispensable, without them you won't understand why some variables can be changed in a function, and others cant. Most of these new hip languages does their absolute best to hide pointers from you, and I really think that's a disservice to the programmer. Static typing is something so simple, it's difficult to mess up, while in lua, a "tree" can mean just about anything, as can "heap", "trie", and so on, they're all just tables and you don't have a compilation stage to check your syntax (and you usually need a separate linter) As for "beginners want to make things", I'll give a personal anecdote. When I was younger my parents insisted that I play an instrument. I went with piano, and they got me a private teacher. After about 4 years of lessons, I had memorized a ton of songs, and could stumble through some simple sight reading, but I didn't have the theory to back me up. It was a heavy wakeup call when I got into senior highschool with other kids that had been classically trained, and had the theory beaten into them. They could sightread stuff that I would take a day or two to learn, and they could actually [I]write music[/I] that didn't sound like a cat dieing. I think learning a programming language is similar, if you don't have the foundation, you will find yourself with a ton of things you need to unlearn, and if you use one of these languages that makes it easy to write bad code, very few things you learned correctly. You're absolutely right when you talk about "lua dosen't care", you can put anything in another anything. Do what the fuck you want, it's lua. [QUOTE]A fool with a tool is [DEL]still a fool[/DEL] a more dangerous fool.[/QUOTE]
html maybe? [url]www.w3schools.com[/url]
Yeah, Lua is easy as fuck. It's the first language I've learned and I caught on in maybe two weeks or so. I'm still not fluent, however, I guess no one is truly [U]completely[/U] fluent in any programming language. I recommend learning C [U]after[/U] learning Lua, due to the fact that it is more complex. As Lua is derived from C.
Agreeing with everyone above, don't waste your time. If what you want to do is make gmod addons, don't waste your time with anything else - jump straight into gmod addons. The "challenges" that you [i]might[/i] face later on if you ever learn another language are pretty small, and you shouldn't worry about them - you'll cross that bridge when you get to it.
Thanks for the feedback guys!
Sorry, you need to Log In to post a reply to this thread.