Various Working Theories
I think the grand unifying idea behind Ki is "scope", manifested in functions. Functions define the scope:
- this scope requires this input
- this scope will build this output
You could maybe even think of a function as a with
block:
with (a: int, b: int) {
echo("{{a + b}}")
}
Or, you could think of a with
block as a function, just with a healthy dose
of polymorphism:
fn add(a: int, b: int): (int) {
return(a + b)
}
fn main() {
with (res: add(1, 2)) {
echo("{{res}}")
}
}
Regardless, it's all scope.