3 ms·
I mostly agree with you, but also can that it can be nice whenever you have a class that has some state and only a single method. If you have this, you no longe
by Someone 7y ago
I mostly agree with you, but also can that it can be nice whenever you have a class that has some state and only a single method. If you have this, you no longer have to pick separate names for the class and the function.
Chances also are that it is inspired by python’s callable (https://en.wikipedia.org/wiki/Callable_object#In_Python https://en.wikipedia.org/wiki/Callable_object#In_Python), which, as far as I know, people don’t complain about much.
- jshier 7y agoIt was indeed; it was proposed and implemented by engineers working on the Swift For TensorFlow project. The earlier dynamic callable features were as well, in order to offer Python interop.
- edflsafoiewq 7y agoIt's just C++'s operator(), right?