M
Modular•8mo ago
Martin Dudek

Roadmap for classes, dynamic polymorphism ...

I noticed that object-oriented programming features like classes and dynamic polymorphins weren't addressed in the last community meeting. Given that Mojo development is tightly coupled with the Max Engine and its assumingly different requirements, I'm wondering if there is a long-term roadmap available for these features. To put it brief, will Mojo have classes in 2024? 😉 Thx
6 Replies
Melody Daniel
Melody Daniel•8mo ago
I think yes actually.
Moosems / Three chickens
I’ll throw in my two cents briefly. Mojo is owned and created by Modular. Modular is a company who owes its ability to exist to its initial investors. These investors saw Mojo and Max as a viable tool to improve their ML workflows and implementations and decided to therefore invest in this technology. Building a language like this is NOT cheap. Because of this it is far more of a gift to have Mojo and shouldn’t be taken for granted. Mojo development is therefore also directly tied to the needs and wants of the initial investors. If this is something Max and by extensenion the investors need/want then yes, but, if not, I don’t see this happening any time soon.
Martin Dudek
Martin DudekOP•8mo ago
Sure not demanding anything, sorry if I gave that expression. But it's legitimate to ask in my opinion.
Moosems / Three chickens
You didn’t come across like that, but my point was I don’t see it being needed by their investors so I don’t see it coming anytime soon 🙂
Darkmatter
Darkmatter•8mo ago
I think that "improved traits" is that feature. Rust style algebraic traits do more or less everything you should do with OOP according to current best practices, but are much more powerful because they allow you to "patch" other people's types with new functionality. Python style duck-typed classes will need to come eventually, but I'm not sure how necessary they will be in the short term since a lot of ML work can be accomplished with composition + procedural code, which is what an algebraic type system excels at.
Martin Dudek
Martin DudekOP•8mo ago
Thanks for your thoughts. I favourComposition over Inheritence in most cases but for that i struggle implementing it without dynamic polymorphism, compile time Dependency Injection works for me only to some degree. Most likely i just need some "best practices" guidance to upgrade my skills and change my view on what i find elegant 😉
Want results from more Discord servers?
Add your server