Frontend Development

Is LUA an easy language?

Submitted by url, , Thread ID: 220951

Thread Closed

RE: Is LUA an easy language?

#5
So when I see people discussion one language vs another the thing the most people seem to miss is that different languages have different use cases. C/C++ are general purpose native languages that are good for a lot of high performance or complex use cases. Something like JavaScript was not created to fit this use case AT ALL and it only adapted slowly to do so after NodeJS became popular. Lua was designed to be embedded in other applications. It does not compile to native code (I'm sure there's an AOT project out there somewhere though) you run it from the command like or embed the Lua library within code written in C++ for example. It was designed to be simple, close to english, and made for humans. Which is why you see wack shit like arrays starting from 1 (and technically they don't even *have* to, it just assumes that they do). Something to understand about Lua which you cannot ignore not matter how much you want to dunk on it, is that it a FAST language. It was designed to be fast too, there's something to be appreciated within the actual language design that most people overlook because they are just consuming it. If you are upset because Lua isn't "modern" or it's "broken" unlike other languages you use, Lua does not care. Write Lua code the way it's meant to be written, read the documentation to understand how scopes work in it and don't expect just because you know a more complex language that you are an expert in Lua just because it is simpler. And you know what? It gets even FASTER because Mike Pall (probably not even their real name) is a robot programming deity. Creator of LuaJIT, Mike Pall appeared out of nowhere without much being known about him. LuaJIT does what it says on the tin. Just-In-Time compilation for Lua that can even make it faster than C in some select benchmarks. Maybe it's not as advanced as you want it to be but it serves it's purpose. An example of where it really shines is scripting for games. You might write the engine in C++ but write the easy scripts that likely need to be edited over and over again in Lua so you don't need especially skilled programmers to write character behavior while also worrying about performance or memory allocation. I really suggest you take a second look at Lua, it can really be a enjoyable programming experience. I suggest you look at things like LuaRocks which is a package repository for Lua kind of like NPM for Node. Check out LOVE2D to make a game with Lua, or better yet, itch.io the huge and awesome marketplace website is actually made with Lua! leafo the creator made a web framework called Lapis that uses Lua and runs with OpenResty an NGINX and LuaJIT-based webserver for great performance. Who knows, you might come around to it... Happy coding!
Want somethingcracked or leaked? PM me and I'll see what I can do! Also free simple GFX requests and signatures.
[Image: burg.bird.cafe]

Users browsing this thread: 1 Guest(s)