[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lexbind: how to replace lexical-let approach to hide secrets
From: |
David Kastrup |
Subject: |
Re: lexbind: how to replace lexical-let approach to hide secrets |
Date: |
Wed, 30 Mar 2011 23:56:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> When lexical-binding is set:
>
> (let ((data "my secret"))
> (lambda () data))
>
> returns something like (closure ((data . "my secret") t) () data).
> If you wan to hide the value, then use:
>
> (let ((data (let ((sym (make-symbol "foo")))
> (set sym "secret")
> sym)))
> (lambda () (symbol-value data)))
>
> which is similar to the what lexical-let ends up doing.
All of which, by necessity, contain the necessary material to get at the
secret in the bytecode/closure/funcell. Where, of course, it is
reasonable easy to retrieve it. And that is actually overkill, since
you can always just call that closure.
Anybody care to tell me what the point of this exercise is actually
supposed to be?
--
David Kastrup
- lexbind ready for merge, Stefan Monnier, 2011/03/29
- Re: lexbind ready for merge, Daniel Colascione, 2011/03/29
- Re: lexbind ready for merge, Stefan Monnier, 2011/03/29
- Re: lexbind ready for merge, Daniel Colascione, 2011/03/30
- Re: lexbind ready for merge, Juanma Barranquero, 2011/03/30
- lexbind: how to replace lexical-let approach to hide secrets (was: lexbind ready for merge), Ted Zlatanov, 2011/03/30
- Re: lexbind: how to replace lexical-let approach to hide secrets, Stefan Monnier, 2011/03/30
- Re: lexbind: how to replace lexical-let approach to hide secrets,
David Kastrup <=
- Re: lexbind: how to replace lexical-let approach to hide secrets, Daniel Colascione, 2011/03/30
- Re: lexbind: how to replace lexical-let approach to hide secrets, Ted Zlatanov, 2011/03/31
- Re: lexbind: how to replace lexical-let approach to hide secrets, Stephen J. Turnbull, 2011/03/31
- Re: lexbind ready for merge, Daniel Colascione, 2011/03/30
- Re: lexbind ready for merge, Juanma Barranquero, 2011/03/30
- Re: lexbind ready for merge, Stefan Monnier, 2011/03/30
Re: lexbind ready for merge, Tassilo Horn, 2011/03/30