Kotlin's extension function in Mojo?
Not so long ago, I've discovered that Kotlin have a possibility to extend already defined classes with a new function.
For example:
will return
I don't asking Modular team to implement it. I'm just curious what others think about that. Is Mojo needs that or
For example:
will return
[Hello, world!] list. This feature is really useful, as it makes code really cleaner without overriding whole class.I don't asking Modular team to implement it. I'm just curious what others think about that. Is Mojo needs that or
static methods is enough? I mean, we can use text.getWordsList() is Kotlin and get_words_list(text) in Mojo and Python. What is better for you?