From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.help Subject: Re: inline function expansion Date: Mon, 8 May 2023 07:12:23 -0400 Message-ID: References: <87bkivhqip.fsf@posteo.net> <87ild34qre.fsf@dataswamp.org> 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="17543"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 08 13:13:16 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1pvynr-0004Gh-Hu for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 May 2023 13:13:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvynK-0000Ny-8f; Mon, 08 May 2023 07:12:42 -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 1pvynG-0000KG-8H for help-gnu-emacs@gnu.org; Mon, 08 May 2023 07:12:38 -0400 Original-Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvynE-00010p-JU for help-gnu-emacs@gnu.org; Mon, 08 May 2023 07:12:38 -0400 Original-Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-24e09b4153eso3084709a91.2 for ; Mon, 08 May 2023 04:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683544355; x=1686136355; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JMguuIkF0LVNkaQu+VtXRDOG3HIqi1Hgtd+9APDfF5Q=; b=EfkQGS+oLtnPiWNHsPrisx13n695c9V0ges3RB04YtDK1+m0Kionhv7Pa989VGh1Qr tQa7BltZc+dDHqXW20yl29or6MLMo8YRoFXRfnMMCpnmalyyKEl8W84P+1VE9VYqDfOQ NAVF9f1AlX3nn9C3w8ZQ7+3iC1CmrRQ5Lzd+9Fpl9w4q/2F9tAkrada4Ud001ks/f7hn Xq6C2pdsyB34N639Id/4zaVquugb3R7nSR09H2xhiWIWt9HLn4jzCnhPVbEbsauxyhrt dS2tLC1F70AetJrrv2YelFClR5w++Tsbj4skAfbMXEXmXyjjL/n5HsRfMOgwwa3wNX6y u4tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683544355; x=1686136355; h=content-transfer-encoding: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=JMguuIkF0LVNkaQu+VtXRDOG3HIqi1Hgtd+9APDfF5Q=; b=l4787HZaGhQ/P2jQ7AynFevWO7KPA9Btu76Kflg47KUSCUO7igZNdfQceiasKj0I2S vUvRk4PuwWB9s9KGSBZfpDxWu/efDVgzwubGxl8ZPcY0JQ/+0yxkowutRu8WpnFBip7n 4xiD9/SzGwNyf9CsfcmAQ/9re76V+oGWmFLwwskcNoybp2GEtL40H7WwkNxPo2Di/13H 9AgpYQUzWzYLlftBhF1l4fZ4eq4L/HrQCSBzHEmXT54iDYJ4Ln5gCDA8QT6C+gX6s7+Z ccaDT3FbOfZyyLQdyJ2gFkoEWEsUJjzc9UqB/AyAP9JXcC0rL2VRP4nLJq4Sx6NTRboS nBUA== X-Gm-Message-State: AC+VfDxpzUzPZShKsnC0K4/VwNIWnxLbnSWwnK1oehzaqhM2UuH6rqxq kaQSaBhi63DbZGIRH0hhId2lQubywqDONzxfBqtY5dDVn9g= X-Google-Smtp-Source: ACHHUZ4lTQs5RP1mlkOymwTQfzwEVPpBz+1qSIEVU0I9uYhlzqsYGpc0AhxyIKGBRcEUW5mZyAzXqKTAHYnxQv6C4/o= X-Received: by 2002:a17:90b:3881:b0:24e:4a1a:3994 with SMTP id mu1-20020a17090b388100b0024e4a1a3994mr10480426pjb.3.1683544354572; Mon, 08 May 2023 04:12:34 -0700 (PDT) In-Reply-To: <87ild34qre.fsf@dataswamp.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=owinebar@gmail.com; helo=mail-pj1-x1036.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143537 Archived-At: On Mon, May 8, 2023 at 12:15=E2=80=AFAM Emanuel Berg = wrote: > >> Isn't the idea of inlining that the behaviour/effect of > >> invoking a function shouldn't change, just that the > >> resulting code might be more efficient? > > > > The main thing I am interested in is the ability to do > > compile-time evaluation on constant expressions. > > What exactly are "constant expressions" in the context of > this discussion? > > The same as this? > > https://www.stroustrup.com/sac10-constexpr.pdf > See https://www.gnu.org/software/emacs/manual/html_node/elisp/Inline-Functi= ons.html#index-inline_002dconst_002dp > > I'm trying to design/implement a way of defining generic > > methods so that the specialization may be determined (or > > explicitly constructed) at compile time and compiled to > > a non-generic function call, and left to dynamic > > dispatch otherwise. > > Okay, so what would be the gain(s) of having such > a capability? A structured way to write generic code without paying a substantial run-time cost. Pretty much the same case as for define-inline, except applied to generic methods. Lynn