Luau, a type-checking variant of the Lua language becomes open source

Recently the release of the first version was announced independent of programming language luau, which continues with the development of Lua and is also compatible with previous versions of Lua 5.1.

The Luau language is designed primarily for embedding scripting engines in applications and aims to achieve high performance and low resource consumption. The project code is written in C ++ and is open under the MIT license.

Luau expands Lua with type checking capabilities and some builds new syntactics like string literals. The language is compatible with previous versions of Lua 5.1 and partially with newer versions. The Lua Runtime API is supported, allowing Luau to be used with pre-existing codes and links.

As of today, Luau is no longer an inseparable part of the Roblox platform; is an independent open source language.

The language runtime is based on heavily revised Lua 5.1 runtime code, but the interpreter has been completely rewritten. The development involved some new optimization techniques that made it possible to achieve higher performance compared to Lua.

When Roblox was created 15 years ago, we chose Lua as the programming language. Lua was small, fast, easy to integrate and learn, and it opened up huge possibilities for our developers.

Much of Roblox was built on Lua, including hundreds of thousands of lines of internally developed code that powers the Roblox application and Roblox Studio to this day, and the millions of experiences that developers have created. For many of them, it was the first programming language they learned.

The project was developed by Roblox and is used in game platform code and custom applications from this company, including the publisher of Roblox Studio. Initially, Luau was developed behind closed doors, but in the end it was decided to transfer it to the category of open projects for further joint development with the participation of the community.

Features:

  • A sequential type system, which occupies an intermediate position between dynamic and static writing. Luau allows static writing as needed by specifying type information through special annotations.
  • The built-in types "Any", "nil", "boolean", "number", "string" and "thread". At the same time, the ability to use dynamic typing without explicitly defining the type of variables and functions is also preserved.
  • Support for literal strings (as in Lua 5.3)
  • Support for the expression "continue", in addition to the existing keyword "break", to jump to a new iteration of the loop.
  • Support for compound assignment operators
  • Support for the use of conditional blocks "If-then-else" in the form of expressions that return the value calculated during the execution of the block. You can specify an arbitrary number of elseif statements in a block.
  • The presence of a sandbox mode which allows you to run untrusted code. This function can be used to organize your own code and code written by another developer, for example third-party libraries that cannot be guaranteed, to run side by side.
  • A limitation of the standard library from which functions that could potentially create security problems have been removed. For example, libraries "io" (access to files and startup processes), "package" (access to files and load modules), "os" (functions to access files and change environment variables have been removed), "Debug" (insecure memory handling), "dofile" and "loadfile" (file system access).
  • Provide tools for static code analysis, error detection (Linter) and validating the use of types.
  • Analyzer, bytecode interpreter and high performance proprietary compiler.
  • Luau does not support JIT compilation yet, but it is argued that the Luau interpreter is quite comparable in performance to LuaJIT in some situations.

Finally if you are interested in knowing more about it, you can check the details In the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.