guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp lexical-let


From: Andy Wingo
Subject: Re: Elisp lexical-let
Date: Thu, 23 Jul 2009 22:56:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi,

On Thu 23 Jul 2009 12:47, Daniel Kraft <address@hidden> writes:

> Ken Raeburn wrote:
>> On Jul 22, 2009, at 05:11, Daniel Kraft wrote:
>>> It seemed really hard to me to find at least *basic* information
>>> about how the lexbind things works; I did build now an emacs with
>>> lexbind from trunk, but so far as I see this is not meant to
>>> implement "lexical-let" as the cl package does, but rather allows
>>> switching all bindings from dynamic to lexical within one source
>>> file.
>>
>> Oh... I may have seriously misunderstood; sorry about that.  That's
>> what comes from not having bothered to look. :-)
>
> Ok, I think I'll work on a cl like lexical-let now and see what this
> gives in performance related to dynamic let (and just to get it
> available of course).
>
> The implementation will (for now at least) be as I favour it, that is,
> inner lets revert to dynamic binding (as do inner lambdas for their
> arguments) -- this is more reasonable (I think), has more power (as the
> other way can be achieved by using lexical-let for inner lets when
> preferred, which is also clearer to understand) and should be easier to
> implement (because I don't need to mess around with the compilation of
> let constructs depending on the context).

Fair enough. The other semantics sound pretty crazy.

> I'll keep in mind also the lexbind idea of optionally making every
> binding lexical.  Andy, can you give me a hint/example/pointer how
> compiler options work?  This would be exactly the place to provide this,
> I think.  Additionally we could add an option to remove the "variable is
> void" error check for a further performance gain.

They don't work! Well, basically they're just a value that reaches the
compiler somehow. I think they are a keyword list: (#:foo bar #:baz qux)
etc. They are set via the #:opts argument to compile; I don't know if
you can set them from the command line. I was waiting for a use case :)

Peace,

Andy
-- 
http://wingolog.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]