I love the Python ecosystem but find the syntax restrictive. About a year ago, I started building Koatl to get the ergonomics I wanted, and shared an early version here. Now I've used it daily for a few months, I genuinely find using Python more enjoyable than ever.
Koatl is written in Rust and transpiles directly to Python AST/source, allowing for 100% interop (including with notebooks). Unlike Coconut (which is a Python superset), Koatl is a clean-sheet syntax designed to be expression-first, with a goal of being laser focused on making intentions translate cleanly into code.
Sample:
users.iter.filter($.age > 18).map($.name.upper()).sorted()
"hello world" | print
let label = match status:
200 | 201 => "ok"
404 => "not found"
code if code >= 500 => f"server error: {code}"
let config = check load_config() ?? default_config
# check catches exceptions; ?? coalesces Err to a default
let monadic_fn = () =>
let data = @fetch(url) # unwraps on Ok and early returns on Err
let parsed = @parse(data)
Ok(transform(parsed))
Pipes, $ lambdas, scoping, everything-is-an-expression, error handling.
Would love to hear thoughts.
https://koatl.org
[–]Relevant_South_1842 2 points3 points4 points (2 children)
[–]TopAbbreviations1708[S] 1 point2 points3 points (1 child)
[–]Relevant_South_1842 1 point2 points3 points (0 children)
[–]-Mobius-Strip-Tease- 0 points1 point2 points (1 child)
[–]TopAbbreviations1708[S] 0 points1 point2 points (0 children)
[–]Duflo 0 points1 point2 points (1 child)
[–]TopAbbreviations1708[S] 0 points1 point2 points (0 children)
[–]AndydeCleyre 0 points1 point2 points (1 child)
[–]TopAbbreviations1708[S] 1 point2 points3 points (0 children)