From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: thunk.el: Document that thunk-force == funcall? Date: Wed, 25 Nov 2020 15:16:40 +0100 Message-ID: <87v9dtttbr.fsf@web.de> References: <871rgs3tdx.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25015"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Nicolas Petton , Emacs Development To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 25 15:17:59 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 1khvcN-0006MU-66 for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Nov 2020 15:17:59 +0100 Original-Received: from localhost ([::1]:43632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khvcM-0000Wj-7n for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Nov 2020 09:17:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khvbO-0008Qq-6g for emacs-devel@gnu.org; Wed, 25 Nov 2020 09:16:58 -0500 Original-Received: from mout.web.de ([212.227.15.3]:57817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khvbJ-0001XW-Vf for emacs-devel@gnu.org; Wed, 25 Nov 2020 09:16:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1606313802; bh=ficoI5W71swN4CA+6ouEXIadAqlAYaGewMVBdXu+G+M=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=sGFHsEuAM9nWzoDKVQeVLA+UZ8p9eyqQGQbqOzPsSGQAbQsJ0olzu1G/ta/VpytRa /lkzF3XtK8rFOUZ2wW0vfVqk5AmAdadywnWmBeIAV0MuHj8AW9gRUAgcjXwI/6W9VL qQ961jKxRNmN7aVuuvIhTE61gLiYtCO8YR5+T56w= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.219.247]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MVLsk-1kiOUm1gn0-00YkOJ; Wed, 25 Nov 2020 15:16:42 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 17 Nov 2020 16:51:22 -0500") X-Provags-ID: V03:K1:glHpS032Yc1iQNKJe3csza6cTQGyyDmzFa7yMo+PaO7Y26pJRM+ 3vdojr96r4VT+mvFeKYqLrnxyOj5ll00D3/4RCfi1jQqit88zS7PQ1RiTSrtmEPR9em74eP aBHfq/E/EEiXPAGW7S86dZepGiEqhE/9hloka6BxzUYJl9G2x/Vp9lRF2h9ow4LhOkeyXts trW9+UGaBPOzO43DIlZwA== X-UI-Out-Filterresults: notjunk:1;V03:K0:wyoi3/5T4zI=:yJ/w7yAyUSpl5HvqkXv7cV oIDGvk70W6rkh+C7SnDN25EvSUWHcfLh49wQud6tiaXfJ1tNtG4cWwv5w0vMefVRq2mUfy+wb LoTbJxnD4ufzD+JL7dUJkhkBkVSRc5tqlaPxDNJLynecFpXpct/4sPXi0VbAgax+q5dlMkfWn EgRJagXtZCP5RP6q4SnwbkVYLhmxjOm6Itv3HtVaZN1rD3vQRtzkzZBOLaieiMgUTC+UvblEv 4GCoCFABq04gpB9ruJIU4Mll31NSbht7pU4Eb3w+NK0vQjzQTiuNoVqXbV8O5RubrfQp2UviU eYSNA1YkZxc8iS6J80lrSsBrj1mPUl1ez0nDYdGe4d6YRC52sy+FE8Fu17T5JL3OZ0ou5N+OV IHAw5JncdhLVxaGP3mJEEspwakhSDtAqtTPb3PAHJd4coNCqaAC1w9mEnM9HSLUeSBur6b+Ze iltRvSepFBY0wapSGDuZ2nqlh6qaMOb4CleGEOLFMCqnEzIn1ekIUZaKhggNPwClhDwt/TxyA VBM2RsD2gpKffdyEz0ATYaLWctn9L3ySjwRbj/1h1pOKuvX0/TJTpjysnXJkkvjrEO+5xjFF0 uKdg63eG2z4B8SyShmXcz0yElBMpklymq0FYLdDErpUWNoiWmlQ5fVBluIgdLca4rTQ7PS0f5 yeYFQubF5suPmiAQE51Oy8B+lcbfD7kS5TL+OSVYvtmv74CI8GnBBz2QtKiqcdY+/RUU89MHq F07y/xRUp3thaVBj6mKJzMTv1tuOxY5SoPsYfuOx3NkcRtv+8iYLf4QO7RoF2H5EG1GshH8L Received-SPF: pass client-ip=212.227.15.3; envelope-from=michael_heerdegen@web.de; helo=mout.web.de 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, 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.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:259782 Archived-At: Stefan Monnier writes: > (defalias 'thunk-function #'identity) I like that idea. > [ That's still pretty hypothetical. ] > I'd be curious to see concrete examples, to get a better idea of > the tradeoffs. I don't have any concrete real-life examples. Only the one somewhat unconventional that led me to this question: I had been implementing my own improved version of `dired-mark-sexp'. It offers some more boolean valued tests, and some are a bit more expensive and partly interdepend, so I made them thunks. When the input expression is evaluated these are made accessible as functions. I would rather do this via `thunk-let' and make these tests available as contents of certain variables but then the repeated macroexpansion slowed down the thing too much. Regards, Michael.