[erlang-questions] [semi-ot] introducing constants and include (that can include erlang code) in efene

Mariano Guerra luismarianoguerra@REDACTED
Wed Aug 17 13:09:02 CEST 2011


On Wed, Aug 17, 2011 at 5:31 AM, Richard O'Keefe <ok@REDACTED> wrote:
>
> On 17/08/2011, at 12:43 AM, Nahuel Greco wrote:
>
>> On Tue, Aug 16, 2011 at 6:26 AM, Mariano Guerra
>> <luismarianoguerra@REDACTED> wrote:
>>>
>>> I don't know a way to mutate the body of a function at runtime, what
>>> can be done right now in efene is that if the expression can be
>>> calculated at compile time, you can execute it then and just put the
>>> result in the bytecode:
>
> Concerning hygienic macros, the crucial thing is that identifiers in
> the expansion of a macro refer to those visible at its definition
> point, unless they come from arguments.  This can be handled by
> renaming, which doesn't sound terribly hacky to me.

do you think that something like collecting variable names from the
outer contexts and checking if there are collision names and renaming
the names that collide is the best way to do it?

I may give it a try :)

> Other functional programming communities have experienced some
> difficulty with evaluating expressions at compile time; the results
> can be very big, and they can be kept far longer than you really
> want them to be.



More information about the erlang-questions mailing list