Month May 2023

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…

99 bottles of beer

There is a famous kid’s song in the USA: 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall. 98 bottles of beer on the…

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…

Foreign Function Interface (FFI)

Argentum can call C/C++ functions and pass parameters of primitive data types and objects. On Argentum side: Create a module io.ag and declare there a number of functions with “;” in place of body: On C/C++ side: Create a library:…