Features

Auto

auto is a keyword that allows you to declare or define a variable without explicitly specifying its type, as the compiler automatically do type inferance. This is useful when the type name is too complicated to write, such as lambda or long named types.

In the example below, we're going to create a lambda with 3 paramenters and return a number

int main(string args[]){

  int32(int32, int32) sum = (int32 a, int32) => a + b;

  # instead of int32(int32, int32)
  auto sum = (int32 a, int32 b) => a + b;

  return 0;
}

The compiler will automatically infer the type for sum.

Using auto too much is not a good practice!
Copyright © 2026