[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52063: 28.0.60; Confusing presentation of lambda
From: |
Lars Ingebrigtsen |
Subject: |
bug#52063: 28.0.60; Confusing presentation of lambda |
Date: |
Fri, 26 Nov 2021 13:26:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> We could have something like:
>
> (let ((foo 1)
> (bar 2)
> (baz 5))
> (lambda (x) (+ x bar)))
>
> return an object like
>
> (closure (x) ((bar . 2))
> (+ x bar))
>
> instead of the current
>
> (closure ((baz . 5) (bar . 2) (foo . 1) t) (x)
> (+ x bar))
That does seem a lot more readable (and makes the similarities to
`lambda' more obvious. Could we go one further and do
(closure (x)
(environment ((bar . 2)))
(+ x bar))
or something like that? And in that case, we could just say even say that
(lambda (x)
(declare (environment ((bar . 2))))
(+ x bar))
is how to represent this. 😀 (I.e., a `lambda' with a `declare
environment' is a closure.)
(Which would also mean that we'd have to allow `declare' in lambdas,
which I think we should anyway.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#52063: 28.0.60; Confusing presentation of lambda, (continued)
- bug#52063: 28.0.60; Confusing presentation of lambda, Philipp Stephani, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Filipp Gunbin, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/25
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/25
- bug#52063: 28.0.60; Confusing presentation of lambda, Jim Porter, 2021/11/25
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda,
Lars Ingebrigtsen <=
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/26
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/27
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/27
- bug#52063: 28.0.60; Confusing presentation of lambda, Lars Ingebrigtsen, 2021/11/29
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/29