Frequently Asked Questions
1. Is Djazair compiled or interpreted?
Djazair features a hybrid design inspired by modern byte-oriented engines. The compiler parses your code, resolves scopes, compiles variables and functions into streamlined bytecode instruction chunks, and executes them on a fast virtual stack-based VM.
2. How does the memory management work?
Djazair features an automated Mark-and-Sweep garbage collector (GC). Local allocations, strings, dynamic array buffers, map nodes, closures, and object instances are tracked dynamically. The garbage collector triggers automatically once memory usage thresholds are crossed.
3. Can I use Djazair within C applications?
Absolutely! Djazair is designed to be easily embeddable. A single include header djazair.h provides all API bindings to instantiate multiple isolated VM stacks, pass command-line arguments, set search folders, register custom callback logs, and execute file routines.
4. What concurrency paradigms does Djazair implement?
Djazair utilizes coroutines. Asynchronous functions declared with async fn return coroutine pointers. Invoking await [coroutine] yields evaluation control back to the VM scheduler, allowing concurrent non-blocking execution streams.
5. Does the ternary operator need an end keyword?
No. The ternary if condition ? value else value does not use an end keyword. Only block-level constructs like if/elif/else/end require end.
6. What does string.index() return on not found?
The index() method returns -1 when the substring is not found — not Null. Check the return value with == -1, not isNull().
7. What is the difference between split() and split("")?
split() without arguments splits on whitespace and removes empty tokens. split("") splits on every empty position, effectively returning an array of individual characters.