SE-0253: Callable values of user-defined nominal types

Personally, I preferred the previous iteration's call() { syntax (rather than func call() {), but I do recognize that there is a benefit to being able to actually access the call function as a bound closure. Unless I am mistaken, this would not be possible otherwise, as decls like call() and subscript() cannot be accessed as closures.

I think that if there was a way to access such declarations, a call() spelling would be preferable, since it seems less "magic" than a function called call or something else implicitly making an instance callable.

3 Likes