From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: defmacro with built-in gensym declaration and initialization Date: Wed, 20 Jan 2021 13:46:16 +0000 Message-ID: <87turbiuvr.fsf@tcd.ie> References: <87bldk6n2l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26129"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: akater Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 20 14:48:11 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l2DqE-0006iI-LN for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jan 2021 14:48:10 +0100 Original-Received: from localhost ([::1]:58854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2DqD-00055h-NO for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jan 2021 08:48:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2DoW-0003vk-6V for emacs-devel@gnu.org; Wed, 20 Jan 2021 08:46:24 -0500 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:55998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l2DoT-0001OV-PE for emacs-devel@gnu.org; Wed, 20 Jan 2021 08:46:23 -0500 Original-Received: by mail-wm1-x32b.google.com with SMTP id c124so2888453wma.5 for ; Wed, 20 Jan 2021 05:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=QhdkmeGg9alknYkq8kZT9blTlquWPE3dSF2tMQol8Gg=; b=MzK9FBl/BKva+7km93xMnlryAxo/+2NHdLVDD0U0CD7h2quKjdN8ZAtQdIJmTUQjtq 37jH7QxKCSBAuWjlF4xm5fvXI1m/sAl6ZGS3jhhC3Yc4GhqqwImtJrtRgpOEqkqIPpdU 3xcLcFS2akCB2BP4iM/mNWjpkNqog54wVxvCdvSARnKVYoT4uhLhS23SjwySh/pDelwx vasXeLLf3I7uAOMfyip8d4I/wjaEuu8jmXDWygn5guVqJDlae630+2zhZA0g0vbvoca9 saLUNrzhjlz273cXB02MoKGXDO/9ONpwEGFkPsUUZM/tHJ5YUszBYwUQp8KX35X09+qF /v3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=QhdkmeGg9alknYkq8kZT9blTlquWPE3dSF2tMQol8Gg=; b=fKbL4hfTWq5n5iMcqJceZ/VDMKc+5GHyrmqiQaBT7E4xtblfUH5tKdtBXPo0zW/QYx YgShzrFOlH/lYakMaoeh0kzZH7+886bTem5vinndX2XeyGQFT8042sCZSQRuqBNEDkdu m/PHEFZE9b9DA3iBKjCxspFRCny2B1ZsC+KD7ZS9kQ/C2ZVxjp+LKlaSi9+UxpHfaLD+ yzfeW3QEHZdy1YfoLuyPrPoH9MfAbGYkH8bsc8VQhOD5TR5l0II9wkdqna8BvMcW9Ogg f3f+uI11x0o2NcgE8rebB2GU4azmzGQo8iUslNzjBZebE0cqYUvjWogsBn++8y5JQJ2m 2kJQ== X-Gm-Message-State: AOAM530/ErIbC2Ly/6J8AW5eGv1otRBScC2H6ldLfdTUR4tUY6ZF6+2R +7zwoMlzgvEq78h10UBuZTbPeA== X-Google-Smtp-Source: ABdhPJzxH67cfbJNbRlpdGEU0XQovxDY9j5wHV3DxAou/jI+dEsejPYDHmsvjZQWIkWx05QHdhpaaQ== X-Received: by 2002:a7b:c115:: with SMTP id w21mr4530846wmi.114.1611150378666; Wed, 20 Jan 2021 05:46:18 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id 33sm4723860wrn.35.2021.01.20.05.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 05:46:17 -0800 (PST) In-Reply-To: <87bldk6n2l.fsf@gmail.com> (akater's message of "Wed, 20 Jan 2021 08:15:46 +0000") Received-SPF: none client-ip=2a00:1450:4864:20::32b; envelope-from=contovob@tcd.ie; helo=mail-wm1-x32b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263203 Archived-At: akater writes: > I suggest extending ~defmacro~ to support ~&gensym~ keyword in its > lambda list, for convenient declaration and initialization of gensyms. [...] > This ~&gensym~ facility eliminates the need for ~with-gensyms~ and > ~once-only~ in cases when gensyms are created unconditionally by macro > function (in Common Lisp parlance). IMO, this minor convenience is insufficient motivation for conflating/complicating a macro's global arglist, i.e. its arity, calling convention, etc., with utilities for its local body. Is there some other motivation? Am I missing something? Why not provide handy gensym/once-only local conveniences for macro authors instead (some of which already exist in one form or another, e.g. macroexp-let2, inline-letevals, and org-with-gensyms)? Thanks, -- Basil