Timeline for Lambda in `defun` Captures the Lexical Environment, But in `let` It Doesn't
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 18, 2023 at 5:11 | comment | added | Tobias | Thanks. Yes this is the strange Emacs behavior which I was referring to. I modified the example a bit to make inspection of the results possible after running the byte-compiled stuff. The behavior is really strange and I really agree with @Drew that it is time for a bug-report. Interactive evaluation, evaluation of source code and evaluation of byte-compiled code should all give the same result. I hadn't the possibility to check native-compiled code. For all cases the result should be that one, expected for lexical binding if lexical-binding is file-locally set to t. I.e., ans = (1 1). | |
| Mar 18, 2023 at 5:05 | history | edited | Tobias | CC BY-SA 4.0 | Added byte-compilation. |
| Mar 18, 2023 at 1:50 | comment | added | phils | I believe you'll find dl.acm.org/doi/abs/10.1145/3386324 to be a worthwhile read. | |
| Mar 18, 2023 at 1:36 | comment | added | phils | I can't comment much on the "different to Common Lisp" question, but the nearest relative of Emacs Lisp is MacLisp. Obviously elisp has evolved since, and the cl/cl-lib library does explicitly provide a heap of Common Lisp-isms; but those aside I don't believe there was ever any attempt to provide parity with CL specifically (RMS wasn't a fan of CL, as I understand it). They are both Lisps (and Lisp-2s) so they'll have lots in common by default, but there will be lots of differences too. | |
| Mar 18, 2023 at 1:11 | comment | added | phils | "I wrote an example. Is that what you're trying to say?" -- yes, exactly so. | |
| Mar 17, 2023 at 12:52 | history | edited | shynur | CC BY-SA 4.0 | added 65 characters in body |
| Mar 17, 2023 at 12:43 | history | edited | shynur | CC BY-SA 4.0 | added 6 characters in body |
| Mar 17, 2023 at 12:38 | history | edited | shynur | CC BY-SA 4.0 | added 6 characters in body |
| Mar 17, 2023 at 12:30 | history | answered | shynur | CC BY-SA 4.0 |