First for all I know this a subjective question and may be it will be closed. However I have a confusion in class methods and Free functions.
As class methods we all are aware and as per maintain code quality it is right approach. So what is the importance of using free functions how it improves the code quality.
In iOS we are create a function in a class and call it like:
let str = self.myFunctionName() /// This is defined in same class
let str = myFreeFunctionName() /// This defined in some other class, so it can be used in other classes.
It's not about efficiency here. It's a design approach. A function represents an implementation characteristic to something. If the logic from within a function is meant to use some of the class properties and is a specific to a class, you embed it there. If a function performs some totally general stuff and is meant to be visible across the project you leave it outside any structure. People don't usually abuse with