Найти тему

WHAT IS LUA, AND WHAT IS IT FOR? 📣

Lua is intended to be used as a standalone scripting language or built into an application. It was originally designed to be simple and compact enough to fit on a variety of platforms and provide acceptable performance.

Lua would have been coined in 1993 at the Catholic University of Rio de Janeiro. The name is translated from Portuguese as the Moon, and the creators kindly ask you not to write LUA, so that, God forbid, someone would take the name for an abbreviation. It is a multi-paradigm scripting language that uses the prototypical OOP model.

The typing here is dynamic, and metatables are used to implement inheritance, that is, this is a great tool for extending the capabilities of your product. And because of its compactness, it is suitable for use on almost any platform.

Advantages and disadvantages

So what is good about Lua?

Firstly, as already noted, its compactness, and coupled with the fact that the source code is written in C, you get full interaction with one of the most popular languages ​​​​on the planet and a wide range of available platforms.

Second, he's fast. If you look at the comparative characteristics with other languages, you can see that although Lua does not fit C or Python on the shoulder blades, it shows excellent results in some tests.

Thirdly, it is very convenient for studying even by not the most experienced programmers. Surely even those who simply know English have understood at least 80% of the code described above and will be able to reproduce it without any problems.

The fourth argument is that you will not have any problems finding information. Lua has a lot of useful information directly on the official website. In addition, the community on StackOverFlow and IRC chat is very well developed, and in the US, developers and creators meet every year.

Fans of modern trends will be attracted by the fact that you can write functional code in Lua. What’s there, if you spend at least a couple of weeks programming in Lua, you will surely find more than a dozen pluses.

However, there are no languages ​​without flaws, but in Lua they are local in nature. So, for example, the default language does not support Unicode, but this is fixed using a special ICU library. Or limited error and exception handling, although many would consider this a boon. Or the need to put the return statement exclusively last in the block, but again, for many, this is a natural rule of good code.

That's all you need to know about LUA.❄️