all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Another question about lambdas
Date: Wed, 18 Jan 2023 12:33:27 +0100	[thread overview]
Message-ID: <87a62gyt4o.fsf@dataswamp.org> (raw)
In-Reply-To: 871qp5o05o.fsf@web.de

Michael Heerdegen wrote:

> At university I learned that lexical binding would be more
> intuitive to understand, but harder to implement. I thought
> I was special because I always found dynamic binding more
> intuitive. I thought it was because I learned Lisp mostly by
> using Emacs, at a time where lexical binding was only
> available using a strange thing called `lexical-let' (AFAIR
> you had to require cl to use it).

It's just how those `let' behaves, one only complicates matter
by speaking of dynamic vs lexical scope in general.
Have a `dlet' and a `llet' and both would be easy
to understand with no need to theorize, at least not to
understand them, it can be interesting for other reasons ...

And yes, the lexical one would be more intuitive since it's in
line with all the data hiding/encapsulation/sandboxing stuff
one has been up to longe before one heard those buzzwords ...

I mean, why do we have all this f(x) and g() { x } notation in
programming if it is, or can be, actually the same x as some
x outside of that? Just looking at it, and writing it, tells
me, "hey, this is an x of it's own". But with dynamic scope it
sometimes isn't and you have to look somewhere else, execute
code in your head etc to find out.

(With `let' it's actually the other way around but it's just
the other side of thinking the same thing, with `let', i.e.,
the lexical one, it's "those x stays here".)

> And a lot have their problems with lexical binding
> and closures.

What do you mean, what's up with them?

-- 
underground experts united
https://dataswamp.org/~incal




  parent reply	other threads:[~2023-01-18 11:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10 17:23 Another question about lambdas Michael Heerdegen
2022-12-10 19:33 ` tomas
2022-12-10 20:29   ` Michael Heerdegen
2022-12-10 20:03 ` Emanuel Berg
2022-12-12  1:50   ` Michael Heerdegen
2023-01-18 11:52     ` Emanuel Berg
2023-01-19 13:23       ` Michael Heerdegen
2022-12-10 21:58 ` Arash Esbati
2022-12-11  0:00   ` Michael Heerdegen
2022-12-11  0:09     ` Michael Heerdegen
2022-12-11  7:02     ` tomas
2022-12-12  1:56       ` Michael Heerdegen
2022-12-12  5:24         ` tomas
2022-12-12  6:22           ` Michael Heerdegen
2023-01-18 11:51             ` Emanuel Berg
2023-01-19 13:24               ` Michael Heerdegen
2023-01-19 13:38               ` Michael Heerdegen
2023-01-30 17:44                 ` Emanuel Berg
2023-02-03  0:20                   ` Michael Heerdegen
2023-02-25  7:31                     ` Emanuel Berg
2023-02-27  8:28                       ` tomas
2023-01-18 11:47           ` Emanuel Berg
2023-01-18 11:33         ` Emanuel Berg [this message]
2023-01-19 13:32           ` Michael Heerdegen
2022-12-13 11:26     ` Arash Esbati
2022-12-14  2:22       ` Michael Heerdegen
2022-12-11  0:13 ` Gregory Heytings
2022-12-11  0:38   ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a62gyt4o.fsf@dataswamp.org \
    --to=incal@dataswamp.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.