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
- 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
Project status
- Apr9. Windows Demo
- Apr 20. Argentum got immutable objects and shared ownership (aggregation)
- May 17. Argentum got Multiline raw string constants and String interpolation
- May 26. Argentum got generics, and FFI-methods.
- May 30. Debugger v0 Breakpoints, stepping, local vars of primitive types
- Jun 5. Debugger v1 Object inspection, watch expressions, strings and limited arrays.
- Jul 28. Multithreading. Asynchronous message passing.
- Aug 26. Return aka Break aka Continue aka Throw-Catch.
- Sep 14. Built-in comparisons and cached hashes.
- Oct 4. All types of Array of pointers.
- Oct 20. Ported to Linux. Run on Steam deck.
- Nov 2. Unused code elimination.
- Nov 12. Multithreaded FFI.
- Nov 20. Hash Maps.
- Dec 10. Integrated with CURL.
- Dec 16. SQLite bindings.
- Dec 29. SDL2-ttf + redesigned SDL2 bindings
- Jan 7. New syntax of string constants and interpolations.
- Jan 15. New lambda syntax,
pipe
andinit
operators. - Jan 20. ARM64, RaspberryPi, and playground.
- Feb 10. Enumerations v1.
Links
- Argentum Book (outdated doc)
- Slides
- Github sources
- Hackaday project page