You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What should I do if I want a multi-inheritance gc language like python?
Are there any plans to introduce multiple inheritance and mro resolution (C3 linearization process)?
If such a feature cannot be added, what are the better simulation methods?
If I do
classReal(A, B) {
_fake_a: A_fake_b: B
}
Real is B=> self._fake_a is A or self._fake_b is BA as Real=>???//A and Real have no real subtype relationship and cannot be convertedB as Real=>???//B and Real have no real subtype relationship and cannot be converted
GC types are not source language types, rather, they describe to the GC the memory layout of low-level data structures in a language runtime. On that level, multiple inheritance does not make sense, because memory layouts can only be extended in one dimension. Mechanisms like multiple inheritance require indirections, which need to be implemented in Wasm code, in the same way you would with linear memory or in a native compiler. This is expected behaviour.
What should I do if I want a multi-inheritance gc language like python?
Are there any plans to introduce multiple inheritance and mro resolution (C3 linearization process)?
If such a feature cannot be added, what are the better simulation methods?
If I do
Is this a good approach?
Or can this method simulate multiple inheritance?
https://github.com/WebAssembly/gc/blob/main/proposals/gc/Overview.md#objects-and-method-tables
The text was updated successfully, but these errors were encountered: