Argentum - a safe, scalable, fast and tiny programming language.
- Argentum is memory safe, type-safe, const-safe, null-safe, array-index safe and so on. It is safe.
Unlike other languages that are also pronounced safe, argentum doesn't have and doesn't need unsafe mode at all, also it has nonull
keyword, noconst-casts
and no other ways around its safety measures.
Argentum is rock-solid safe, no-cap. - Argentum automates memory management, and (which is unique) object hierarchy management.
For example, if you declare that an engine belongs to a car, Argentum checks at compile time that no two cars share the same engine instance. - Unlike Rust and Swift Argentum guarantees absence of memory leaks.
- Unlike Java, Go, JS and Python, Argentum doesn't use garbage collector, so no sudden pauses, overheads, and leaks.
- Argentum has precise predictable object disposal moments, so objects can control any resources, not just memory.
- Argentum compiles to machine code producing tiny executables with no extra dependencies.
- Argentum has multithreading without deadlocks and data races.
- Argentum is simple and expressive, crazy fast and memory-effective.
- And its interop with C is mostly a pass-through.
Try Argentum compiler:
- With playground
- on Windows in VSCode: step by step instruction
- on Linux aglan_0.0-1_amd64.deb (todo: write a post)
Hello world in Argentum:
using sys { log } // Import function `log` from module `sys`
log("Hello world") // Call it
More examples are here: SQLite example, Web client example, Tutorials
Publications
All publications and articles related to the Argentum features and ideas that were published to the broader audience:
- Announcement. Argentum programming language
- Publication 1. Managing Object Lifetimes
- Publication 2. How Argentum makes fast dynamic_cast and interface method dispatch with 4 CPU instructions
- Publication 3. How Argentum programming language handles object hierarchies
- Series of publications. Optional-Based Conditionals
- Formal proof of absence of memory leaks in Argentum: single-threaded case, multi-threaded case
Features
- What is Argentum
- Syntax
- Formal grammar
- Module file description
- Expressions
- Modules
- Multiline raw string constants, String interpolation and String cursors
- Multithreading
- Tests
- Break/continue/return/throw operator
- Functions and callables
- Types
- Generics
- Memory management (how it works without GC)
- Object lifetime management in Argentum. First look.
- Understanding Composition in Programming: Importance, Support in Argentum, and Differences from Mainstream Languages
- More on pointers to mutable objects: Composition/Association/TemporaryLocks
- Shared Pointers and Immutable Objects
- Parent pointers and splicing
- Classes and Interfaces
- Control flow using
optionals
JSON
module- A StAX (reverse SAX) parser
- A direct writer (in compact and pretty-print forms)
- JSON DOM for special cases.
Tutorials
- Basic Syntax
- Fizz-Buzz.
- Graphs with Cycles.
- Call C99 functions from Argentum.
- SDL Demo.
- HTTPS->SQL
- Using Debugger
Videos
Links
- Argentum Book (outdated doc)
- Slides
- Github sources
- Hackaday project page