Lua vs. other languages

There is one thing in particular I’ve always been curious about:
Why is roblox lua not indent-based and lacks a character ending a statement (such as a semicolon)?
Other languages need semicolons like java while languages like python need to be correctly indented. How can roblox function without either of these requirements?

The design of a programming language and its execution was initially a choice for whoever created them. It’s almost like picking a flavor on ice cream, except that the design choice may be more or less beneficial in different usages. Some designs are more targeted towards certain usages while others are attempting the generalization strategy, opening and widening possibility of the language. The difference between the languages are their convenience, safety and speed, but also choice.

You can try reading a little around it, but the concept depends on mostly execution. A paradigm may be in place to execute the code.

The code you are writing on the scripts in Roblox is source code, which is then put in an interpreter to execute the lines. The design of the interpreter depends, but most interpreter are almost the same per programming language, exceptions are with special design choice to adapt to certain engines. Syntaxing between languages are different and yet, they can still achieve the same task but written differently. The machine code, code that machines can read but hardly understandable to a human, in the end may look identical but they are not always fully identical, some are more or less optimized.

1 Like