I have long envisioned a language where these two things were tightly combined. The rough ideas are:
- All arguments are keyword arguments. - Each function implicitly defines a struct type equivalent to its arguments.
I think if you combined this with some nice structural typing you can get a lot of the argument forwarding/builders and similar that people enjoy in dynamic languages without much/any overhead. Rough example:
fn add(a: int, b: int): int { a + b }
fn add3(c: int, rest: add::args): int { add(rest) + 3 }
A somewhat silly example but I think you can see the point. Of course you could also add language-level builder syntax to these structs and have something really nice.
I think the key here is that once you make the arguments a static type you can add loads of convenience like builders very easily.