Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

Language Overview

Aussom is a small, object-oriented scripting language that runs on the Java Virtual Machine. Its core ideas are easy to summarize:

  • One file, one or more classes. Every line of Aussom code lives inside a class. There is no top-level scripting outside a class.
  • Looks like Java, feels lighter. Variables are not declared with a type by default. Type annotations are available where they help.
  • Embeddable and sandboxed. A Java host can run untrusted Aussom scripts and control exactly what they are allowed to see.
  • Same code, three runtimes. The same Aussom source runs from the CLI, inside a Java host, on Aussom Server, or in a browser through Aussom-Script.

This Basics section is the language reference. Read it in order on a first pass, or jump to a specific topic. Each page is short and focused.

Section What it covers
Variables Local and member variables, access modifiers.
Data Types The nine built-in data types and their literal forms.
Functions Defining and calling functions. Default and variadic arguments. Set blocks.
Control Flow if / else if / else, switch, while, and for loops.
Operators Math, string, list, and the safe-access ? operator.
Classes Constructors, members, inheritance, static classes.
Exception Handling try / catch and throw.
Modules Splitting code across files with include.
Extern Classes Calling Java code from Aussom.
Standard Library A tour of the modules that ship with the interpreter.

Two more references live alongside the language sections:

  • Style Guide - naming conventions, formatting, and Aussom-Doc comments.
  • Annotations Guide - attaching metadata to classes, members, and methods.

A few conventions used in these docs

  • Code blocks show Aussom source. Output, when relevant, is shown in a separate block right after.
  • Where a feature is new in a recent release, the page mentions it.
  • Identifiers in prose are wrapped in backticks, like c.log. Code examples avoid backticks.

Identifier rules, once

These rules apply to every name you write in Aussom: classes, members, functions, function arguments, local variables, loop variables, module names, enum names. The rest of the docs assume them.

  • Letters A-Z and a-z, digits 0-9, and the underscore _ are allowed.
  • A name may start with any allowed character, including a digit or an underscore.
  • Reserved keywords cannot be used as names. The full list: class, enum, include, public, protected, private, static, extern, return, try, catch, throw, new, null, if, else, switch, case, default, while, break, for, instanceof.

Style preferences (PascalCase classes, camelCase functions, and so on) live in the Style Guide. The language itself does not enforce them.