Key Path Expressions as Functions

Looks good! Another future direction would be to introduce Callable (i.e. the static equivalent to DynamicCallable) and treat function types as the existential type of types that are Callable with a matching signature. Key paths would naturally be Callable and would therefore convert to the existential function type just any concrete type conforming to a protocol does with protocol existentials today.

10 Likes