From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? Date: Tue, 29 Aug 2023 12:20:31 +0100 Message-ID: References: <87zg2bosf3.fsf@dataswamp.org> <875y4y14vy.fsf@localhost> 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="3034"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 29 13:19:08 2023 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 1qawkV-0000V6-44 for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Aug 2023 13:19:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qawjY-0008HT-2G; Tue, 29 Aug 2023 07:18:08 -0400 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 1qawjW-0008H7-FI for emacs-devel@gnu.org; Tue, 29 Aug 2023 07:18:06 -0400 Original-Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qawjS-0008Hu-R4 for emacs-devel@gnu.org; Tue, 29 Aug 2023 07:18:06 -0400 Original-Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2bcfd3220d3so46691881fa.2 for ; Tue, 29 Aug 2023 04:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693307881; x=1693912681; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KEo1FxfwLkkuKy25IqUjC0KZ7GJnLG92iJJw45CnTMw=; b=TFpotIBk8cPX6BFgOgYgBQRECdU8XRmXCUMSQLwqrDuevK/qj9vaYPnwed+C5jPyUa FMcO2xT3ibXBbWowD+w1vU+aOhUQcTktZwpLb9uFkA+Zn8DVJXwq7ioYO83k64qssr0O Ang2TBO9iOF18V3eo2VvZ+bEeSfuaU9/BMuOLkTFwQrlILh9a5+wBbPyHXsfLIgyai84 X1iBmAZRaznxoaiRx7QXTxEGjtR2rGSL19M/mcZiyJzRH6fC87mnyhese/YyhFpGagb/ f4LsUmQ406JCerHBt0sR5QpPI+ud7KlwSdkYrNbX9TaPFO9AeMNbNDHzvEIyOlVrSHqL UEoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693307881; x=1693912681; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KEo1FxfwLkkuKy25IqUjC0KZ7GJnLG92iJJw45CnTMw=; b=U1B9KQwXgav4Zp6IbpxX35bX1On+EtZAovzISqpvnMTOfUQghlxpduy4quoLTcI7ii xkzxilorn9kzuiGbH4I2WV+O+EFcr8GMTdXusSLklk7P2pLrBd1nYR8Al0RoZQokFI07 kvVWKdqeYc52Pndb2RWb/dJkAZbuVmfIKn5cLw+khKnSqv2cxHfOW5n0JcwmcY0qoArC v9NMRZeotWnEyRig3HQBI+zkZrDQtNxL6V39K+hzGHCJKuhnZOVg/mXZdlyuxb1P7+DV 6t7EKp0kifWmV9XPQX+Z6XIXK02HB731XcXfIRns78fS05rU0TC7SVy6WX7ZLVg0Jz9h BLGQ== X-Gm-Message-State: AOJu0YyUxUmfZQswX6ougBHBfhEhxYgaVM+5Fa+ZkMX7Zbx/d3xWmplq pWdQcc4OS7qAZu1bjD6DOGFOcrm6TRDmOWJcKtc= X-Google-Smtp-Source: AGHT+IHaDx71gE//+NzawbREaINgttGEqA7inypUA4vdS2HnWEvXE2HPEOOz8aa6kBhIsKY/0qJuNB+CC89h76pMnwk= X-Received: by 2002:a2e:b807:0:b0:2bd:4b:adf1 with SMTP id u7-20020a2eb807000000b002bd004badf1mr6174339ljo.20.1693307880594; Tue, 29 Aug 2023 04:18:00 -0700 (PDT) In-Reply-To: <875y4y14vy.fsf@localhost> Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309491 Archived-At: On Tue, Aug 29, 2023 at 12:09=E2=80=AFPM Ihor Radchenko wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > FWIW, Common Lisp has reader macros to solve the problem: > > http://clhs.lisp.se/Body/24_aba.htm > > Elisp also has reader macros ;) > See lisp/emacs-lisp/backquote.el Of course it has many more even, but the problem is that such things are hardcoded in C even if part of the implementation then jumps to Lisp. See lread.c around line 4318 for how backquote is hardcoded. In Common Lisp there is a programmable mechanism for adding such macros entirely within the language. So don't be fooled, Elisp simply doesn't have that. Jo=C3=A3o