📄️ Break Statement
This keyword accepts an optional integral argument which tells it how many levels of enclosing loops it should break. The default value is 1, thus breaking out of the current loop.
📄️ Compiler Warnings
Pluto offers optional compiler warnings for certain misbehaviors.
📄️ Default Arguments
During a function declaration, parameters can now declare their own default value, which must be a compile-time constant.
📄️ In Expressions
Searching a string for a substring, or searching an array for an element is a very simple operation now. The in operator has been extended to support these operations.
📄️ Numeral Parsing
Pluto makes two small changes to numeral parsing.
📄️ Safe Navigation
Accessing deeply nested fields which can potentially be nil was problematic, because you'd need an unreasonable amount of guard clauses to prevent an "attempt to index nil" error. Pluto now offers this syntax:
📄️ String Indexing
You can index strings for their characters now, which is cleaner & 3x faster than using string.sub. String indexing only occurs when you index with an integer, either positive or negative. Positive integers index from the start of the string, and negative integers index from the end.
📄️ String Interpolation
String interpolation is very simple.
📄️ Table Freezing
Tables can now be frozen at their current state to forbid any future modification. This action is irreversible and permanent for the lifespan of the table.
📄️ Type Hinting
Type-hinting looks like this: