@@ -32,7 +32,7 @@ constraints, omitting to count the 4th, yet implicitly respecting it:
3232Additionally, C4 extends C3 with support for structs that require single-inheritance,
3333by adding the following constraint:
3434
35- 5 . * Struct Suffix* (first implicitly recognized by Scala 3? ):
35+ 5 . * Struct Suffix* (first implicitly recognized by Ruby, and later by Scala 3):
3636 A struct's precedence list is a suffix
3737 of the precedence list of its subclasses.
3838
@@ -48,24 +48,28 @@ the precedence list in cases that multiple solutions satisfy the above constrain
4848 this is equivalent to building the precedence list tail-first with the reverse traversal.
4949 A different traversal for instance would be depth-first, but there are good reasons to pick
5050 depth-first, notably in perserving as much as possible the tail of the precedence list,
51- thereby maximizing sharing of partial semantics in methods and slots.
51+ thereby maximizing sharing of partial semantics in methods and slots
52+ even when the tail is not explicitly declared as being part of a struct.
5253
5354* NB* : C3 was adopted by many modern multiple inheritance object systems for its consistency properties:
5455OpenDylan, Python 2.3, Raku, Parrot, Solidity, PGF/TikZ.
55- Our 5th constraint has been adopted by Scala 3
56- (that fails to otherwise use C3 or offer its consistency).
57- But as far as we know, as of May 2025, Gerbil Scheme 0.18.2 is the only language adopting both.
56+ Our 5th constraint has been adopted by Ruby and Scala 3,
57+ that fail to otherwise use C3 or offer its consistency.
58+
59+ But as far as we know, as of May 2025, Gerbil Scheme 0.18.2 is the only language
60+ respecting all these constraints.
5861
5962* PS* : Common Lisp, and the earlier tradition of multiple inheritance, that we
60- follow here, all the way back to Flavors, calls "classes" the things with
61- multiple inheritance and "structs" the things with single inheritance only.
62- Smalltalk and after it Java, and the earlier and historically more prevalent
63- tradition of single inheritance, calls "classes" the things with single
64- inheritance and "traits" the things with multiple inheritance (after Mesa).
65- C++ only has multiple inheritance (though duplicating non-virtual superclasses
66- behave more like mixin inheritance), and calls "struct" a class where all
67- "members" are public by default. Wonderful nomenclature, right?
68- We here stick to the Common Lisp namings.
63+ follow here, all the way back to Flavors, calls "classes" the entities with
64+ multiple inheritance and "structs" the entities with single inheritance only.
65+ Smalltalk and after it Java and Scala, and the earlier and historically more prevalent
66+ tradition of single inheritance, calls "classes" the entities with single
67+ inheritance and "traits" the entities with multiple inheritance (after Mesa);
68+ as for Ruby, it calls them respectively "classes" and "modules".
69+ C++ only has its own limited variant of "Multiple Inheritance"
70+ (though duplicating non-virtual superclasses behave more like mixin inheritance),
71+ and calls "struct" a class where all "members" are public by default.
72+ Wonderful nomenclature, right? We here stick to the Common Lisp namings.
6973
7074## Procedures
7175
0 commit comments