Unsupported and reserved syntax
These are features you may meet in other languages or in Pliro design plans. They are not currently available Pliro syntax. You do not need to learn them to start programming.
- Type annotations label a value’s type in code, such as
let score: Number = 0. A return type, such as-> Number, labels a function’s result. breakwould end a loop early;continuewould skip to its next turn;passwould stand for an empty instruction.elifmeans another conditional branch;switchandmatchselect between cases.- Periodic timers repeat at intervals. Pointer move/drag, GPIO changes, and sprite events would react to those actions. Only the currently documented event forms work.
- A class describes objects with data and behavior; a method is a function attached to an object; a constructor sets a new object up. Inheritance reuses another class’s design. A separate record type would describe a fixed set of named fields.
- An anonymous function, or lambda, is a function without a declared name.
- Async/await and tasks are ways some languages describe work that can pause while other work continues. Threads are separate flows of execution; channels pass messages between them; synchronization coordinates their access to shared data. These syntax forms are unavailable; Pliro does have cooperative event scripts.
- Exceptions let code report a failure for other code to handle.
try,catch,throw, andfinallyare related forms in other languages. - Augmented assignment, such as
+=, combines a calculation and an update. Increment/decrement operators add or subtract one. Use Pliro’s ordinarysetinstead. - A default parameter has a preset value; a named argument is matched by label; an optional parameter may be omitted; a variadic parameter accepts a varying number of arguments; a typed parameter has a type label. User functions currently use a fixed number of positional arguments. Some built-ins have their own documented optional arguments.
- String interpolation inserts values into text using special placeholders. Raw strings would skip ordinary escape processing; multiline strings would span source lines. These forms and single-quoted text literals are unavailable.
- A slice selects a section of a list; a comprehension builds a list from a compact loop-like expression; a range describes a sequence such as the integers from one to ten. These shortcuts and looping directly over a Map are unavailable.
- External packages are reusable code from outside the project; an import alias gives an imported module another name. Network dependency resolution automatically finds and downloads required packages. Use the documented project modules.
- A date literal would write a calendar date as its own value type. Date values and date input are unavailable.
- Macros and compile-time metaprogramming generate or change code while it is being built. Conditional compilation includes different code for different build conditions.
Reserved means a spelling is kept for a possible language use. Pliro recognizes -> as a token but currently has no valid grammar rule using it. A design proposal is not a promise that a feature already works.
