Open
Description
With records, it becomes tempting to rely more on type-inference. Inference is important for records, because it avoids lots of repetition
The problem is, inference for the return value of function is only available with closures:
// Inferred as ({String name, int age}) Function()
final example = () => (name: '', age: 42);
If we use a "normal" function, we are forced to specify the return value:
({String name, int age}) example() => (name: '', age: 42);
Proposal
It'd be cool to have a mean to define classical functions, but infer the value. One possibility could be:
infer example() => (name: '', age: 42);