The way I understand the r7rs-large process, is that it tries to split out low floor difficulty / portable concerns (eg., streams) from high floor difficulty / not-portable concerns (syntax-case, etc), so that implementations could choose to implement some but not all of it, to extent that is feasible (I wasn't there when it happened, but my understanding of r6rs controversies was mostly to do with implementers getting handed uncompromising burden of implementation requirements). In that view, it seems sensible to me to have both specific procedures now and plausibly generic procedures later. Also, specific procedures enable more deterministic optimization opportunities. Number system is generic in the standard, but we also have eg. srfi 143 providing non-generic procedures with "allow more efficient implementations" stated as the core reasoning. 2023-01-09, pr, 11:03 Lassi Kortela rašė: > >> Scheme needs some way to define "interfaces"/"traits" that multiple > data-types > >> can implement. Many Scheme implementations (including Kawa) have that, > but a > >> general portable solution is highly desired. Without that, there is no > point > >> in piling on more and more libraries for more and more data types. > > > This requires generics and this requires method dispatching. > > > > Many Schemers like to pay the price for dynamic types, but are scared by > the > > price for dynamic dispatching. I am still astonished why this is the > case. > > The efficiency debate can only be settled by profiling and benchmarking. > > > Any ideas? > > IMHO the right solution is: > > - Specify generic collection procedures in RnRS. > > - Those procedures MUST handle all the collection types in RnRS. > > - The procedures SHOULD also handle extra collection types provided by > the Scheme implementation (from SRFIs, etc.) > > - The implementation MAY support user-defined generic procedures. When > it does, the standard collection procedures SHOULD be defined using this > framework so that users can extend them. > > The RnRS number procedures are already generic, and work according to > these principles (e.g. Kawa extends them to support quaternions). This > approach is simple, flexible, and has stood the test of time. >