Category Features

Return, break, continue

Argentum blocks can be marked with ‘=name’ labels that are visible from inner sub-statements. They are used in ^leave statements. Leave-statement can have a parameter – expression that produces result It reads as “here’s a block “sign”. If ‘i<0’ terminate…

Multithreading

Argentum threads act as ultra-lightweight processes. They don’t use mutexes, conditional variables or atomics to share state. They share immutable objects naturally and isolate hierarchies of mutable objects inside single thread. There is a mechanism of asynchronous request passing that…

Asynchronous mode

Argentum application can work in either: In the synchronous mode application gets executed this way: In this mode application has access to the following objects: There is no global variables and no mutable global state in this mode: by tracing…

Argentum debugger v1

Debugger v0 supported breakpoints, call-stack inspection and stepping through the program. Version 1 added object inspection and watch expressions. Also it has special support for strings and limited support for arrays. This version is available in binary distribution. 1. Installation…

Argentum got a Debugger v0

In the first version of the Debugger : So far debugger is available only in Argentum compiler built from sources. This is the way to build *.ag application with debug info (and with no optimizations): This debug info is lldb/dwarf…

Generics v0

Now argentum classes and interfaces can have parameters: Parameters can be used in place of classes in type declarations: In v0 there are three limitations: Some of these limitations will be reduced in next revisions. Arrays became generics too: These…

String interpolation v1

Multiline raw strings can have placeholders with the common language expressions: It prints: As described here, the format expression of a multiline string defines extra indent, tab handling, line endings and extra linefeeds There is more. It can contain one…

Multiline raw string constants

String literals are bad but necessary In general, the use of literal strings in the program source code is considered a bad practice. There are two reasons for this: Unfortunately, in the modern world, a huge number of programs are…

Module file structure

Module source file contains three parts (order matters): Dependencies In this example moduleA is used without name imports, thus all names of that module can be referred using long names: moduleA_functionfromModuleA For example: sys_getParent. While moduleB is used with imports.…

Formal grammar

General program structure Argentum program consists on modules. All module sources are placed in the same directory in text files having “.ag” extension. File name matches module name. One module is passed to the compiler as starting module name. Compiler…