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

I don't agree with the special syntax being based on funcs that happen to use the word call. If I were designing an API, special cases like this would be a definite code smell, and I believe the same here. A consistently designed solution would be either:

  1. A attribute like @callable applied to a function you want special syntax on, which would discard all param names
  2. All functions are also implicitly callable, so no keyword required
  3. An entirely different spelling, like func _, func(, or func self(.

func + call together is poor API design.

10 Likes