I have already written that there are only alternative ways of polyformism, but there is no real polyformism. If we do not read the posts carefully, we repeat the same concepts.There are ways to do that, anyway (workarounds but it is realizable).
Way 1 - pass a Map
Way 2 - pass a "custom type object" - this is better, probably.
It does not support polyformism, but somehow we can overcome this lack by creating different methods each one that supports the parameters that we need.
And it is clear that with the term Poliformism we also include other.
We are not talking about "alternative" methods to overcome what is missing on B4X, otherwise I can list how I get something similar to inheritance, polymorphism or how I get something similar to the extension of a class. But the topic is not it. He simply wondered if it was possible to implement them.
Before ik B4A existed the Map we did everything with Lists and types. With alternative methods we obtained something similar to the Map. But how much more useful it was when the Map was implemented, nobody has ever made it clear that it was not needed or that they could do without it. Now we also have a collection, an even more powerful library.
As long as it is missing we are looking for alternative methods, but it does not mean that it would not be necessary to have an implementation in language
Last edited: