Repository navigation
What Is tiko lang
tiko is a compiled, statically typed programming language for applications and systems programming. It is written to be read: blocks say what they close (end function, next, end if), keywords are words, and there is very little punctuation. It has generics, tuples, lambdas, typed errors, defer, channels and direct use of C headers. It compiles to native code through LLVM, with no virtual machine and no garbage collector.
tiko has its own lexer, preprocessor, parser, type checker and typed IR. It emits LLVM IR and hands that to clang to make objects and executables. tiko-lang is the repository; the language, its compiler (tiko, tiko.exe) and its TKO diagnostics are all tiko.
The readable systems language: command-line tools, services, terminal UIs and native Windows applications, where Rust is more than the job needs and Go's garbage collector or binary size is unwelcome.
- Readable by design. Code reads top to bottom as prose.
- Fast. Native code through LLVM. The benchmarks give the measured numbers.
-
Small and self-contained. A hello world is a 23 KB executable that imports only
kernel32.dllanducrtbase.dll. You don't install a runtime and you don't need Visual Studio. -
No garbage collector. Strings and containers free themselves at the end of their scope, and
defercovers everything else. -
Concurrency in the language.
spawn, typed channels andselect channel. -
Reads C headers directly.
#cincludeimports a C library's own header, so there is no binding to write. -
Batteries included. Containers, sorting,
ResultandOptional, filesystem, date and time, math, exact money types, logging and a terminal UI toolkit ship with the compiler. The Feature Index lists them.
tiko is honest about where it stops:
-
No compile-time memory safety. Runtime checks (bounds, null pointers) are available with
-exx, but there is no borrow checker. -
Goroutines are not green threads.
spawnqueues a call on a pool of operating-system threads. - ARM64 on macOS only. There is no Linux or Windows ARM64 target.
-
No inline
ASM. It is refused withTKO0407rather than miscompiled. -
Not every dialect.
#lang "qb","fblite"and"deprecated"are refused (TKO0317), and so isGOSUB(TKO0409). -
__FB_MIN_VERSION__. tiko does not define it. tiko identifies itself with__TIKO_COMPILER__instead. See__TIKO_COMPILER__.
| Target | |
|---|---|
windows-x86_64 |
The default on Windows. Links against ucrtbase.dll and needs no Visual Studio. |
linux-x86_64 |
The default on Linux. |
macos-arm64 |
The default on macOS (Apple Silicon, macOS 13 or newer). It links with Apple's linker and SDK, so on a Mac. |
x86-64 everywhere, and ARM64 on macOS. -m32 and -target win32 are refused (TKO0104, TKO0103). There is one backend: LLVM IR through clang. See LLVM Backend.
tiko's syntax comes from the most readable family of languages ever designed for people. The language kept that readability and replaced everything underneath it: the compiler, the type system and the runtime are tiko's own.
One consequence is useful. tiko still compiles FreeBASIC 1.20 code (#lang "fb"), so existing programs can move over and mix freely with tiko code. Compatibility says exactly what is the same, what differs and what is refused.
The repository's README.md and HANDOFF.md carry the measured state. Among them:
- tiko compiles itself to a byte-identical fixpoint on windows-x86_64, linux-x86_64 and macos-arm64.
tiko is pre-1.0. Prebuilt toolchains for all three are published as Releases.
- Quick Start: build a toolchain and compile something.
- Feature Index: every language feature and library, one line each.
- FAQ: the questions that come up first.
- Compatibility: what this means for FreeBASIC code you already have.
- The repository: https://github.com/PaulSquires/tiko-lang
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing