[Accepted with Modification] SE-0253 - Callable values of user-defined nominal types

Bikeshed alert...

Was it mentioned during this discussion that, in isolation, it's not at all clear whether "call" is intended to serve as an adjective or a verb in this context (the name callFunction)? It is in fact an adjective, which is an unusual and somewhat awkward parsing of "call".

I would speculate that most readers unfamiliar with the system would assume callFunction() to be a method that accepts a function as an argument, which the receiving entity is then intended to call. But that's wrong.

I think clarity might be aided by keeping "call" as a verb. If you want a longer name, how about callAsFunction()?

14 Likes