From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Naming FCRs Date: Tue, 28 Dec 2021 02:31:36 +0200 Message-ID: <5f16f3f7-831b-1458-ed13-c40a83b3ea01@yandex.ru> References: <724e537f-badc-60a5-eef7-33663d0c7441@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20178"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 28 01:33:31 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 1n20Qi-00053m-M5 for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Dec 2021 01:33:28 +0100 Original-Received: from localhost ([::1]:50342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n20Qg-0004uB-BN for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Dec 2021 19:33:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n20Q8-0004Dm-3g for emacs-devel@gnu.org; Mon, 27 Dec 2021 19:32:52 -0500 Original-Received: from [2a00:1450:4864:20::32e] (port=35723 helo=mail-wm1-x32e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n20Q6-0000Az-4U for emacs-devel@gnu.org; Mon, 27 Dec 2021 19:32:51 -0500 Original-Received: by mail-wm1-x32e.google.com with SMTP id v10-20020a05600c214a00b00345e59928eeso5273241wml.0 for ; Mon, 27 Dec 2021 16:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/SZXXgZZFL5nGc7KYWEu4Ttnp3jOGnOP/pbZ8SyZbmA=; b=LCJDm3ZB+GAjxrb+royy6eoxpQpRSbiUy9aJTkPV4vzQFvYl4S706qDc2ebcgezOvT m9LaeWZ4z9IuKII9Er+hFSWlhjOLDcAKMiZSXT/ash0M/dF+fT4HFqxl8+LvsMEAdN/8 rhPL+FUYxEi7N9KUjBMNaJrChyUITJpD0MpXcuMhSHBp+4jV2UENkf+2xSqtpYsbA0xX gxira4J9LC+YrUZ03MHUKqNUIsNep9WcL5mmrCBNwlLBxTqWzAK7PUfvgi+ifxuiBAdn UkZgbiVW0RJ6pHAr+chM+RJypLgI9JK/SNqBpUZec0ZASEcNYU8mmP/uLxCq0Jk4Ph6j wCvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/SZXXgZZFL5nGc7KYWEu4Ttnp3jOGnOP/pbZ8SyZbmA=; b=FdLOIe2Kep1aFnrUohJDMK3zhWyl6UUNkQKDfL5pWkT+3IbGJ6ccNnr0Q/eHcIhZKF IdKHgmBFyoyhc+kAj8BLyVekDOVRNYSZ7PnE2D/6VQNNN7IQvCiNY1eBPN9JXEH5cDmI eSndICwJXAOynhWLhwmieAEpHpIcIFtUQuuhnWTot4CmiGWFrt3DqwG+oRBEQdhM7pSx 92r7SPLoPgpfxFOfGecFQKE9WxIJiILFHRLUohTnExuTaC8NJzQo0Jd+zqLRYO827p4F shC5hvFJIibjL3F0uYVaSWwhIoHah54nmVABZUO4TFQ4Hse2WpL0CWOdlMEFIq5uMwNc +Evg== X-Gm-Message-State: AOAM530Rbw7HJCc2hqsl67c9nZeDOnsem0saPwFQ/V2OZkDDEZtBxn+z FJyO5lYg9uNZt00tvvdBDc2/O7U1N98= X-Google-Smtp-Source: ABdhPJzzuvHIfF56X176n2JEQ3IGQ/sbE5SHBGhOvNNfjOLTgj4rejQVD/rO+ZXGm0O1cVS4dWrrcg== X-Received: by 2002:a05:600c:3c84:: with SMTP id bg4mr9090624wmb.190.1640651568623; Mon, 27 Dec 2021 16:32:48 -0800 (PST) Original-Received: from [10.111.255.129] ([185.209.196.135]) by smtp.googlemail.com with ESMTPSA id j3sm16357178wrt.14.2021.12.27.16.32.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Dec 2021 16:32:48 -0800 (PST) In-Reply-To: Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32e.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_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-1.363, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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.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" Xref: news.gmane.io gmane.emacs.devel:283457 Archived-At: On 27.12.2021 21:55, Stefan Monnier wrote: > Dmitry Gutov [2021-12-27 00:29:29] wrote: >> On 27.12.2021 01:04, Stefan Monnier wrote: >>> - Monomaniac objects (since they're a bit like OO-style objects but >>> limited to have only exactly one method). >> A function with a value attached sounds like a "method". > > Hmm... in my mind a method is more like a function attached to a (set > of) objects. In Ruby object model anyway, a Method is a method bound to a particular instance of a class (https://ruby-doc.org/core-2.7.1/Method.html), whereas for methods not bound to any given value the term is "unbound method" (https://ruby-doc.org/core-2.7.1/UnboundMethod.html). Though I suppose one semantic distinction is that when one thinks about methods, some "class" is present in the context, and one would usually expect that said class should contain other methods as well (i.e. the value that is said method is bound to, can respond to some other methods), which matters to how one organizes code. But... that's not necessarily true when one considers CLOS or our cl-defmethod, right? Anyway, perhaps an unambiguous term could be "bound method". Or if we take JavaScript, the return value of Function#bind (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) is described as "bound function". But JS uses the word "function" for both "normal" functions and methods, so I suppose "bound method" would be less ambiguous. On the third hand, the adjective hints at some action of "binding" which is supposed to produce such values, which is true of both Ruby and JS examples. If there is nothing similar going on in fcr.el, maybe such term wouldn't be ideal. >> Not too fun, though. > > There's a fair bit of potential by playing with the "meth" prefix, I think. Following the glorious tradition of "gimp", "git" and "slime". >> I also looked at the branch briefly -- if it's what it sounded like then you >> might be setting up a new "Callable protocol" which can allow any object to >> serve as a function, not just records? Like how maps are callable >> in Clojure. > > Not really. It's more about adding object characteristics to functions than > adding function characteristics to objects. All right, then.