I’m having some trouble understanding where I shou...
# getting-started
e
I’m having some trouble understanding where I should define extension functions. Given the convention
In particular, when defining extension functions for a class which are relevant for all clients of this class, put them in the same file where the class itself is defined.
Why would I ever put extensions for
Foo
in the same file as
Foo
? Wouldn’t I just make them normal functions of
Foo
?