Draft:Luau (programming language)

Luau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua. Lua is backwards-compatible with Lua 5.1 and is designed mainly for the popular video game platform Roblox.

It was developed by Roblox's internal team along with open source contributors. It underpins all user-generated content on Roblox, offering APIs for 3D world manipulation, backend access, UI interaction, and more. Used by hundreds of thousands of developers, Luau is the first programming language for many and essential in Roblox Studio for creating plugins and games.

History
In 2006, Roblox chose Lua as its programming language for users due to its simplicity, efficiency, and suitability for embedding in games, allowing users to script immersive games with ease. However, limitations in type checking, performance, and missing features in Lua 5.1 led to the development of Luau in 2019. Luau maintains backward compatibility with Lua 5.1 but introduces enhancements like gradual typing for large codebases, better performance, and additional features while keeping the language simple and beginner-friendly.

Luau's evolution is guided by a collaborative process involving compiler, runtime, type checker, and tooling development. This ensures efficient execution and practicality, with an emphasis on performance and memory optimization. Future developments will focus on enhancing type inference, exploring native code generation, and innovating in hardware utilization across cores and nodes. Luau continues to be refined to balance simplicity with advanced functionality, supporting the vast and diverse Roblox developer community.

Syntax
The syntax of Luau is similar to Lua 5.1 but also include the following features:

String literals

 * inserts a character with the code 0xAB into the string
 * inserts a UTF8 byte sequence that encodes U+0ABC character into the string (note that braces are mandatory)
 * at the end of the line inside a string literal ignores all following whitespace including newlines, which can be helpful for breaking long literals into multiple lines.

Number literals

 * Hexadecimal integer literals,  or
 * Binary integer literals,  or
 * Decimal separators in all integer literals, using  for readability: ,  ,

Compound assingments
Luau supports compound assignments with the following operators:,  ,  ,  ,  ,  ,  ,. Just like regular assignments, compound assignments are statements, not expressions: