From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Some improvements for cl-flet Date: Tue, 12 Oct 2021 18:43:00 -0400 Message-ID: References: <87bl4zqnqn.fsf@gmail.com> <87czpe4rj2.fsf@web.de> <874kaqqxe7.fsf@gmail.com> <87y281cowz.fsf@web.de> <87sfxdr2ds.fsf@gmail.com> <877demdb5w.fsf@gmail.com> <87tuhq20tp.fsf@web.de> <87czodcgby.fsf@yahoo.com> <1792c161-ffc4-76b8-1b54-9376703b1e80@dasyatidae.com> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24130"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Robin Tarsiger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 13 00:51:08 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 1maQc0-00067Q-6P for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Oct 2021 00:51:08 +0200 Original-Received: from localhost ([::1]:33962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maQby-0007YI-Pu for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Oct 2021 18:51:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maQU9-0003yK-RD for emacs-devel@gnu.org; Tue, 12 Oct 2021 18:43:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34592) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maQU9-0007EW-E6; Tue, 12 Oct 2021 18:43:01 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1maQU8-0001SJ-Ur; Tue, 12 Oct 2021 18:43:00 -0400 In-Reply-To: <1792c161-ffc4-76b8-1b54-9376703b1e80@dasyatidae.com> (message from Robin Tarsiger on Mon, 11 Oct 2021 19:29:27 -0500) 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:276844 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > One key category of use is for macros that take a body and want to expose > variable-like places to that body. For instance, there is the with-slots macro > which binds convenience aliases for slots of a CLOS object, so that: > (with-slots (foo bar) object > (setf foo bar)) Is this small convenience worth complicating the basic semantics of Lisp? We don't use CLOS very much. If there is no need for asynchronous atomicity, with-slots can be implemented with a macro that expands into (let ((foo (slot-value object 'foo)) (bar (slot-value object bar))) (unwind-protect (setf foo bar) (setf (slot-value object 'foo) foo) (setf (slot-value object 'bar) bar))) We can tell people, if you're concerned about atomicity, access slots by hand. Adding additional features to a language gives a benefit. But there is also a benefit in preserving the things you know can't be happening in a program. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)