Differences between class and struct
I know classes aren't implemented yet and structs aren't complete, but do we have a sense what they are going to look like when they're done and what their differences will be? I have a few specific questions:
Will classes be a high-level pythonic version of structs (like def is to fn) or will classes have low-level performance?
I know structs will eventually work with traits and will probably be able to use extensions in a way similar to inheritance. Will classes work with traits or will they have to inherit from other classes?
Given that Mojo is aiming for python compatibility, I imagine classes are going to have to support multiple inheritance. Since it can be a pretty controversial feature, will structs support anything like multiple inheritance through multiple extensions?
A:
from @sora — 11/01/2023 5:25 AM
I think it would be similar to how Swift does it: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/classesandstructures/