▲ | instig007 10 hours ago | |
> doesn't let you colocate the types with the leaves of the binding form Can you elaborate on the effective difference between colocations in your example and this:
The `Kwargs{..}` alone does imply a non-ambiguous type in the function signature (without explicit but optional annotations), and it binds locally scoped names too. Why doesn't it colocate in the same sense? | ||
▲ | sestep 7 hours ago | parent [-] | |
It's similar to the Rust example from my post: there are no anonymous records, so in order to be able to construct something with named fields, you need to first define those record types outside. In contrast, my proposed syntax depends on already having anonymous record types like OCaml and TypeScript do, but avoids the extra boilerplate required by separating types from binding forms as shown in my TypeScript example. |