Syntax Overview

Hello, World!

>_("Hello, Styio!")

Basic Type

Boolean

x = $T

x = $F

Integer

x : i32 = 0

Float

y : f64 = 0.0

Char

z = '\n'

Project

Import Module

Resource

Resource Declaration (Global) (Can Only Be Assigned Once)

Resource Assignment (Immutable) (Final)

Resource Definition (Immutable) (Final)

Variable

Variable Declaration (Global) (Mutable) (Flexible)

Variable Definition (Global) (Mutable) (Flexible)

Variable Assignment (Global) (Mutable) (Flexible)

Variable Assignment (Global) (Immutable) (Final)

Function

Function Declaration (Accept Overload) (Flexible) (Danger!)

Function Definition (Reject Overload) (Final)

Function Declaration / Definition (With Optional Arguments)

Function Declaration / Definition (With Optional Arguments and Keyword Arguments)

Closure / Anonymous Function / Lambda Expression

Enumeration

Definition (Final)

Struct

Struct Definition (Reject Overload) (Final)

Struct: Inherit

Struct: Extra Methods

Evaluation

Use evaluation pipeline

Extra: Evaluate Stream Computing

Extra: Stream Template

Collection

String

Format String

Verbatim String (Resource)

Raw String

Tuple

Array

List

Get size (length) of the list

Push / Append / Add an element to the tail

Pop / Delete the last element

Reversed

Get an element by index

Get index of an element

Insert an element by index

Insert an element to the head

Remove an element by index

Remove elements by many indices

Remove an element by value (from left to right)

Remove elements by many values (from left to right)

Remove element by value (from right to left)

Remove elements by condition

Add elements by lambda function (Danger!)

Remove elements by lambda function (Danger!)

Form a list from another list

Form a list from a dictionary

Record

Get the value by name of attribute (item)

Dictionary

Get value by key

Add Key-Value Pair

Remove key-value pair

Update dictionary by another dictionary

Decompose

Get keys

Get values

Apply Lambda Function

Control Flow

Condition / Cases

if ... then ... else ...

match

Loop / Iteration

Before We Start, You Need To Know:

Return

Break

Continue

Infinite Loop

Infinite Loop (With Auto Cast + Match Cases)

Range

Range Iterator

Range Iterator (With Auto Cast)

Range Iterator (With Auto Cast + Match Cases)

Range Iterator (With Auto Cast + Check Is In)

Range Iterator (With Auto Cast + Check Condition)

List

List Iterator

List Iterator (With Auto Cast)

List Iterator (With Auto Cast + Match Cases)

List Iterator (With Auto Cast + Check Is In)

List Iterator (With Auto Cast + Check Condition)

IO

Print

Read File

Write File

Listen Web Socket (Block Thread)

Concurrent

Lock (I'm sure there is a way but just can't find now.)

Exception handling

Operator Overload

Template (Format Expression)
Description

Negative: - This

Binary Addition: This + Other

Binary Subtraction: This - Other

Binary Multiplication: This * Other

Binary Division: This / Other

Math: Power {Base: This, Exponent: Other}

Math: Modulo {Dividend: This, Divisor: Other}

Reversed Addition: Other + This

Reversed Addition: Other - This

Reversed Addition: Other * This

Reversed Addition: Other / This

Math: Power {Base: Other, Exponent: This}

Math: Modulo {Dividend: Other, Divisor: This}

Other += This

Other -= This

Other *= This

Other /= This

Other %= This

Logic NOT: ! This

Logic AND: This && Other

Logic OR: This || Other

Logic XOR: This || Other

Bit AND: This & Other

Bit OR: This | Other

Bit Right Shift: This >> Other

Bit Left Shift: This << Other

Method: Get size (length) of This

Method: Get string of This

Method: Get type of This

Method: Get Item of This

Method: Set Item of This as Value

Method: Get Attr of This

Method: Set Attr of This as Value

Method: Get reversed collection.

Method: Check if This in List or not.

Iterator: Implement an iterator for This collection.

Trigger: When an instance of This is called, do ...

Trigger: When an instance of This is called, with arguments of (x, y), do ...

Trigger: When an instance of This is called, with optional arguments of *, and keyword arguments of **, do ...

Last updated