# [Zeolite Programming Language][zeolite]
[![Haskell CI Status][action-status]][action-zeolite]
[![Hackage Status][hackage-status]][hackage-zeolite-lang]
Zeolite is a statically-typed, general-purpose programming language. The type
system revolves around defining objects and their usage patterns.
Zeolite prioritizes making code written with it simple to understand for readers
who didn't write the original code. This is done by limiting flexibility in
some places and increasing it in others. In particular, emphasis is placed on
the user's experience when troubleshooting code that is *incorrect*.
The design of the type system and the language itself is influenced by positive
and negative experiences with Java, C++, Haskell, Python, and Go, with
collaborative development, and with various systems of code-quality enforcement.
Due to the way GitHub renders embedded HTML, the colors might not show up in the
syntax-highlighted code in this document. If you use the Chrome browser, you can
view the intended formatting using the
[Markdown Viewer](https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk)
extension to view the
[raw version](https://raw.githubusercontent.com/ta0kira/zeolite/master/README.md)
of this document.
## Table of Contents
- [Project Status](#project-status)
- [Language Overview](#language-overview)
- [Programming Paradigms](#programming-paradigms)
- [Parameter Variance](#parameter-variance)
- [Parameters as Variables](#parameters-as-variables)
- [Integrated Test Runner](#integrated-test-runner)
- [Integrated Build System](#integrated-build-system)
- [Data Encapsulation](#data-encapsulation)
- [Quick Start](#quick-start)
- [Installation](#installation)
- [Hello World](#hello-world)
- [Writing Programs](#writing-programs)
- [Basic Ideas](#basic-ideas)
- [Declaring Functions](#declaring-functions)
- [Defining Functions](#defining-functions)
- [Using Variables](#using-variables)
- [Calling Functions](#calling-functions)
- [Functions As Operators](#functions-as-operators)
- [Data Members and Value Creation](#data-members-and-value-creation)
- [Conditionals](#conditionals)
- [Scoping and Cleanup](#scoping-and-cleanup)
- [Loops](#loops)
- [Multiple Returns](#multiple-returns)
- [Optional and Weak Values](#optional-and-weak-values)
- [Deferred Variable Initialization](#deferred-variable-initialization)
- [Immediate Program Termination](#immediate-program-termination)
- [Call Delegation](#call-delegation)
- [Function Argument Labels](#function-argument-labels)
- [Using Parameters](#using-parameters)
- [Using Interfaces](#using-interfaces)
- [Immutable Types](#immutable-types)
- [The `#self` Parameter](#the-self-parameter)
- [Type Inference](#type-inference)
- [Other Features](#other-features)
- [Meta Types](#meta-types)
- [Explicit Type Conversion](#explicit-type-conversion)
- [Runtime Type Reduction](#runtime-type-reduction)
- [Value Instance Comparison](#value-instance-comparison)
- [Limited Function Visibility](#limited-function-visibility)
- [Builtins](#builtins)
- [Reserved Words](#reserved-words)
- [Builtin Types](#builtin-types)
- [Builtin Constants](#builtin-constants)
- [Builtin Functions](#builtin-functions)
- [Layout and Dependencies](#layout-and-dependencies)
- [Using Public Source Files](#using-public-source-files)
- [Standard Library](#standard-library)
- [Modules](#modules)
- [Unit Testing](#unit-testing)
- [Writing Tests](#writing-tests)
- [Code Coverage](#code-coverage)
- [Compiler Pragmas and Macros](#compiler-pragmas-and-macros)
- [Source File Pragmas](#source-file-pragmas)
- [Procedure Pragmas](#procedure-pragmas)
- [`define` Pragmas](#define-pragmas)
- [`unittest` Pragmas](#unittest-pragmas)
- [Local Variable Rules](#local-variable-rules)
- [Expression Macros](#expression-macros)
- [Known Language Limitations](#known-language-limitations)
- [Reference Counting](#reference-counting)
## Project Status
Zeolite is still evolving in all areas (syntax, build system, etc.), and it
still lacks a lot of standard library functionality. That said, it was designed
with practical applications in mind. It *does not* prioritize having
impressive toy examples (e.g., merge-sort or "Hello World" in one line); the
real value is seen in programs with higher relational complexity.
## Language Overview
This section discusses some of the features that make Zeolite unique. It does
not go into detail about all of the language's features; see
[Writing Programs](#writing-programs) and the [full examples][examples] for more
specific language information.
### Programming Paradigms
Zeolite currently uses both [procedural][procedural] and [object-oriented][oop]
programming paradigms. It shares many features with Java, but it also has
additional features and restrictions meant to simplify code maintenance.
### Parameter Variance
The initial motivation for Zeolite was a type system that allows implicit
conversions between different parameterizations of parameterized types. A
parameterized type is a type with type "place-holders", e.g., `template`s in C++
and generics in Java.
Java and C++ *do not* allow you to safely convert between different
parameterizations. For example, you cannot safely convert a `List` into
a `List