Flo - Docs & Comparisons

Goals

Flo aims to reduce boilerplate and keep syntactic surface minimal while remaining explicit and easy to read.

Comparison Matrix

Indicative comparison of lines for small tasks (lower is better). These are illustrative examples only.

TaskPythonJavaScriptFlo
Sum 1..10331
Read & print file231
HTTP GET and parse874

More Examples

Data Transform

data = read_file "data.csv"
rows = parse_csv data
rows = filter rows | r -> r.age > 18
print map rows | r -> r.name

HTTP (pseudo)

res = http_get "https://api.example.com/users"
users = parse_json res
print users[0].name

Language pairings

More comparisons to highlight concision and idioms.

Rust
fn greet(name: &str) -> String { format!("Hello, {}", name) }
println!("{}", greet("World"));
greet name = "Hello, " + name
print greet "World"
TypeScript
const names = ["a","b"].map(s => s.toUpperCase())
console.log(names)
print map ["a","b"] | s -> upper s
PHP
$a = array_map(fn($x) => $x * 2, [1,2,3]);
print_r($a);
print map [1,2,3] | x -> x * 2

Download

Download a compact cheatsheet (text) for quick reference.

Download Cheatsheet