general-purpose and systems programming language
FOL is a general-purpose, systems programming language designed for robustness, efficiency, portability, expressiveness and most importantly elegance. Heavily inspired (and shamelessly copying) from languages: zig, nim, c++, go, rust, julia (in this order), hence the name - FOL (Frankenstein's Objective Language). In Albanian language "fol" means "speak".
** FOL IS STILL JUST AN IDEA **
Everything in FOL is declared like below:
declaration<options> name: returntype = { body; };
declaration<options> name: returntype = { body; } | { checker } | { alternative; };
use // imports, includes ...
def // macros, bocks, definitions ...
var // all variables: ordinal, container, complex, special
pro // subporgrams with side effects - procedures
fun // subporgrams with no side effects - functions
log // subporgrams with logic only - logicals
typ // new types: records, entries, blueprints ...
ali // aiased types and extensions
when(condition){ case (){}; case (){}; * {}; };
loop(condition){ };
use log: mod[std] = {fmt::log};
def argo: mod[init] = {
-var const: str = "something here"
+pro main: int = {
log.warn("Last warning!...");
.echo(add(3, 5));
}
fun add(a, b: int): int = { a + b }
}