From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: Keywords in define-method Date: Tue, 26 Nov 2024 01:13:49 +0100 Message-ID: References: <87iksg2qnm.fsf@gnu.org> <87h67zxxxn.fsf@gnu.org> Reply-To: mikael@djurfeldt.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29126"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel , guile-user , David Pirotte , Tomas Volf <~@wolfsden.cz> To: Jan Nieuwenhuizen Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Nov 26 01:14:31 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tFjDq-0007R6-Ru for guile-user@m.gmane-mx.org; Tue, 26 Nov 2024 01:14:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFjDS-0007Kz-Qn; Mon, 25 Nov 2024 19:14:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFjDR-0007Kj-98; Mon, 25 Nov 2024 19:14:05 -0500 Original-Received: from mail-vs1-f54.google.com ([209.85.217.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFjDP-0000oe-Ik; Mon, 25 Nov 2024 19:14:04 -0500 Original-Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-4af19693f14so634205137.0; Mon, 25 Nov 2024 16:14:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732580041; x=1733184841; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YtxFn4h8rHVyN6WkPtu+zjNW8i82rxWSIAcLVi+e0XQ=; b=VWRELUacdyKCLCWgEUvMvf5jth47FU3wpeHbQuExBZ//sx24TV8uDtZO7oNPsYcGp7 zWkJnwr/Ghn0G6gaxcI6xSd7TGgIa43Vw5rNN8CmfFK53P6QzklMC6gLoV2GTCOvo5M9 wJa7K2mWKaJMIUPBukxhwt9e/Y6Jb10z7vpz+lrMG31NBS2AdEDV+dprEIXxXx3l7Mde I/v2r7mmYXyIwHA2XAjP+711mDU6WDI9qi9PLkCP/80ccik5KBUqrZ+6mOjPL8JGROxU 90sI/EaL5MtzuiRHuj+TAqEI1gvEI+0mSuk/5k9RhJ/Xzmhn2Ue89QRxluPdbC+ZopTZ T2vA== X-Forwarded-Encrypted: i=1; AJvYcCWoSbSnjRoT0ttm0OfjhBtPXcHKm85+N+obMAEPvhSGpBdkaA0oajHKIGJtTLceJY59DAC7NzEdPb9P@gnu.org X-Gm-Message-State: AOJu0Yx44rAPYC+hEkZ8/ZtTTHU9QYZLlgZ0sYg37QhsmENz9Ks6KZzf gHla6wct6N8ttXL6XLp8ZJMUsHFHbVeElMLyYrpe5cHDgDjvsDdqoGgKEU6VWCq1pBLBNwfG/Ta aDBkYy6Q6aNxPG0CWjjJilvfqO38Kww== X-Gm-Gg: ASbGncttM83efM5aFb9+iykfEdbo6R1oCGGbQ9qwfTlOJWVwUB7cXt1iUQiw/nGVN1f Tx/BU9TOCpdWlpYrp4nLOGsvWMJSI X-Google-Smtp-Source: AGHT+IFnxZ7kP9lbnVci1wLHltCACmzfXDp1S4DN2dY4qtU8kAnW7fJCPoUDW56A2f0IETBMu0V5xvEHey5IsYIpJAk= X-Received: by 2002:a05:6102:3e90:b0:4ad:4dd5:2b37 with SMTP id ada2fe7eead31-4addcc0dbc5mr15031200137.14.1732580040833; Mon, 25 Nov 2024 16:14:00 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=209.85.217.54; envelope-from=mdjurfeldt@gmail.com; helo=mail-vs1-f54.google.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.93, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19928 gmane.lisp.guile.devel:22804 Archived-At: Den tis 26 nov. 2024 00:51Mikael Djurfeldt skrev: > On Fri, Nov 22, 2024 at 1:20=E2=80=AFPM wrote: > >> ...which I think in your version, not having to use define-method* >> feels more elegant/GOOPSy to me, as it's all overloads/generics, >> but I have no strong opionion on this. >> > > There's actually a secret to what I have committed: > > define-method* *is* the define-method you requested. > > So you can do, e.g.: > > (use-modules ((oop goops) > #:hide (define-method) > #:renamer (lambda (s) (if (eq? s 'define-method*) > 'define-method s)))) > > or > > (define-module (foo) > #:use-module ((oop goops) > #:hide (define-method) > #:renamer (lambda (s) (if (eq? s 'define-method*) > 'define-method s)))) > > and then > > (define-method (bar #:key x) x) > > For ordinary formals, like > > (define-method (baz x) ...) > > the resulting behavior and efficiency will be very close to identical. > That was a bit unclear. What I meant was that for ordinary formals define-method* compiles almost as fast as define-method and: The compiled code and type dispatch of the method will be identical to that > produced by the original define-method macro. >