SE-0253: Static callables

This is a fair point; supporting func call is necessary for source compatibility (and also because there are methods that genuinely should be named call).


Actually, I've come to strongly agree that direct references of call-syntax delegate methods via foo.call is undesirable and the wrong direction.

The eventual direction is not to support direct call member references, but to support conversions of callables to function-typed values. Supporting explicit casting via as seems noncontroversial, and implicit conversion requires more exploration.

call declarations should be represented as "instance methods with a special-case name", not "instance methods with the name 'call'".


Thread participants seem to agree with this direction. @rxwei or I will update the proposal to remove foo.call direct references, and instead advocate creating { foo(...) } thunks in the short term.

6 Likes