On 15.12.2017 06:10, Nathan Harvey wrote:
I think your first step - "define a file that contains extension functions" -
is slightly wrong. In Kotlin, you can place extension methods anywhere, they
do not have to be confined to a single file (or worse, like Groovy, in a
totally different dependency). The syntax I discussed is what enables them
to do this.
I am aware of that you can define them anywhere. But frankly, I find that pretty messy. I mean defining quasi global extension methods randomly all over the place... does sound like maintenance hell to me. Probably best to declare them inline as well, then you will never ever be able to find them again, if they are from a library.