From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Appending lists Date: Thu, 17 Jun 2021 02:02:09 +0300 Message-ID: References: <87zgvs2bup.fsf@zoho.eu> <87y2bby1kr.fsf@zoho.eu> <20210615091834.GB24886@tuxteam.de> <87im2ewr3k.fsf@zoho.eu> <20210616072819.GB17919@tuxteam.de> <87im2dvjgl.fsf@zoho.eu> <20210616184915.GA18839@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21472"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.7+183 (3d24855) (2021-05-28) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 17 01:04:37 2021 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 1lteaL-0005LV-2V for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 01:04:37 +0200 Original-Received: from localhost ([::1]:40156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lteaJ-0002H9-Ip for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 19:04:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lteZy-0002Gz-DO for help-gnu-emacs@gnu.org; Wed, 16 Jun 2021 19:04:14 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:40061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lteZw-0008LJ-IX for help-gnu-emacs@gnu.org; Wed, 16 Jun 2021 19:04:14 -0400 Original-Received: from localhost ([::ffff:197.157.0.23]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000076064.0000000060CA8369.00007653; Wed, 16 Jun 2021 16:04:09 -0700 Mail-Followup-To: Stefan Monnier , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:130931 Archived-At: * Stefan Monnier via Users list for the GNU Emacs text editor [2021-06-17 01:36]: > > To put a point across it would be better to announce or make a title > > that you don't talk how "variable never changes", but you talk about > > the structures in memory and somewhat interesting though practically > > within the spoken context useless information. What matters for > > programmer is that variable A instead of holding value 1 now has value > > 2, that is a change, and how that change was internally accomplished > > does not change the fact that A is now not 1 but is 2. (づ。◕‿‿◕。)づ > > That's the problem with mutation. > In a language like Haskell where mutation is not allowed, when you have > > x = [1, 2, 3] > > then the value held in variable `x` is really a list of 3 elements. > But in a language like ELisp, when you have > > (let ((x (list 1 2 3))) ... > > the value held in variable `x` is not a list of 3 elements: it's really > nothing more than a reference to a location in memory holding a cons > cell (constraints in ELisp's type system ensure that this location in > memory will always hold a cons cell). The values held in the `car/cdr` > of that cons cell will depend on the current memory state, they are not > part of "the value held in `x`". When there is elephant in front of me, and there was one, then somebody comes across and says, ah, that is not really an elephant in front of you, it's really nothing more than a reference to a bunch of walking meat and bones... then there is nothing useful about it. I have to run anyway, or pee myself. Or, maybe it would be good changing the Elisp manuals where you can place the statements like: "the value held in variable `x' is not a list of 3 elements where by: (let ((x (list 1 2 3))) x) ⇒ (1 2 3) is not what you see... (irony) If you wish to go deep, go even deeper and talk how there is no cdr and car, no cons, and no Lisp, as all we are talking about is about turning it on and turning it off, you see? There are actually no lists at all, there is no Lisp, no C programming, as in the reality there is something else, it is just our consideration... go even deeper and demand from Emacs Lisp programmer to understand the quantum physics as in reality, well, there is no matter at all... as what you see is not really there... go back to the Big Bang, but that is not Emacs Lisp context. Emacs Lisp programmer is high level programmer who enjoys the straight practical language. That is quite a different context. The value bound to variable `x' makes the variable have that value. As simple as that. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/