# WL
WL is a powerful and flexible, yet experimental scripting language for templating with first-class support for HTML.
## Features
1. *Zero dependencies* - It only uses pure C and the standard library
2. *Single-file implementation* - Everything is inside `wl.c` and `wl.h`
3. *HTML-first design* - Native HTML syntax with embedded scripting
4. *Complete scripting language* - Variables, functions, loops, conditional branches, arrays, maps. We've got it all!
5. Built-in XSS protection - `escape()` function to sanitize dynamic HTML
6. *No I/O or dynamic allocations* - Any I/O or memory management is left to the user
7. *Include system* - Modular template composition over multiple files
## Language
WL is designed to be extremely powerful and flexible, but realistically you will use a small number of features most of the time. For instance, I expect most templates to look something like this:
```
let title = "Title of my webpage"
let items = ["A", "B", "C"]
let navigator =
\title
\navigator
\for item in items:
item
```
But really, WL is a full fledged scripting languages, so let's start from the beginning...
### Expressions
WL supports integer, floats, booleans, strings, arrays, and maps values
```
100
4.5
true
false
"Hello, world!"
[1, 2, 3]
+{'name': 'Francesco', 'greeting': 'sup'}
```
Evaluating expressions in the global scope will automatically write them to output. One thing you may not expect is that when arrays are printed out, their contents are just concatenated and printed out. This is useful for doing lazy string manipulation. Map on the other hand, are not considered as printable objects and will only output `