Hey, It's me again, now with a question about the nature of the language and performance.
Being this a fully OOP language the only way to organize the code is on modules, methods and objects. I feel the temptation now that my project is growing of creating some classes to separate concerns and make the code more readable, intuitive and maintainable.
So before I throw myself into the madness of OOP design, I want to know how cheap are objects to create and to keep in memory versus calling functions that takes all their arguments.
Let my give you an example: I have a function that renders bi-color text on screen. I pass this function all the arguments it needs (which are like 8?) and the code of such function is directly on the watchface object. To me it makes sense to create a class that handles this and to instantiate it, for example, during onLayout.
For objects that I instantiate on certain life-cycle methods and then I re-use them I think it is worth it, but what about (for example) creating objects on loops? Is that an acceptable practice?
What about custom Drawables that are used on layout.xml? It will make my layout.xml easier to write and the code related to it also, but, what about performance of such practices? I can't find anything on the programmers guide about this.
Thanks and regards.