From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by sourceware.org (Postfix) with ESMTPS id 834113858D37 for ; Mon, 9 Jan 2023 09:03:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 834113858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lassi.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lassi.io Received: (Authenticated sender: lassi@lassi.io) by mail.gandi.net (Postfix) with ESMTPSA id 311B710000D; Mon, 9 Jan 2023 09:03:18 +0000 (UTC) Message-ID: Date: Mon, 9 Jan 2023 11:03:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Time for a new release? 3.1.2? To: Sascha Ziemann , kawa mailing list References: <0aee6f41-9f36-e9ef-6761-e8d81a3b5f5f@bothner.com> Content-Language: en-US From: Lassi Kortela In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >> 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.