From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Using funcall on inline functions Date: Sun, 13 Dec 2020 10:27:03 -0800 Message-ID: <87czzdzhmw.fsf@ericabrahamsen.net> References: <87bleyd4hz.fsf@ericabrahamsen.net> <87h7opzjfi.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28657"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:GtTZikiyW8p7gYlPvhUHazn9iMY= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 13 19:27:49 2020 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 1koW61-0007Lc-7z for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Dec 2020 19:27:49 +0100 Original-Received: from localhost ([::1]:40330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koW60-0002oj-Al for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Dec 2020 13:27:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koW5R-0002Jv-V6 for emacs-devel@gnu.org; Sun, 13 Dec 2020 13:27:13 -0500 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:46402 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koW5Q-00028W-DO for emacs-devel@gnu.org; Sun, 13 Dec 2020 13:27:13 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1koW5M-0006W0-WC for emacs-devel@gnu.org; Sun, 13 Dec 2020 19:27:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:260773 Archived-At: Stefan Monnier writes: >> Hmm, interesting. I guess I would feel a little weird about having to >> change all callers specifically for this -- I can see myself six months >> from now having no memory of doing this, and causing bugs for myself. > > Yeah, `gv-ref` is not super popular, indeed. Can't blame you. I actually like the mechanism and what it lets you do, but would prefer it to be buried deep someplace where I can't see it. >>> [ BTW, your `ebdb-add-to-list` has a bug in that it will evaluate its >>> second argument before its first. ] >> inline-letevals! But, for my information, isn't the bug that ELEMENT is >> evaluated twice? > > Oh, yeah, that as well. > >> Why does the order of evaluation matter? > > Because in ELisp order of evaluation of function arguments is specified > to be "left to right" and code can (and does every once in a while) rely > on it. It's not super-frequent, but not really rare either (e.g. it's > quite common for things like `delete-region`). Not something that ever occurred to me. This has been an educational thread, even though the result will probably be me deciding this inline isn't necessary at all. Thanks, Eric