[erlang-questions] Core erlang wildcards and sequences

Ludovic Demblans <>
Sat Aug 24 14:30:59 CEST 2013


Hi,

So it's better to stick with nested let-exprs.

It's quite hard to find docs about core erlang, i have some docs but not
examples to hack with. Would you mind to post an example of erlang code
which would use letrecs when compiled to core erlang ?

If i read well, 'local recursive functions' are sorts of self-aware funs
that can call themselves ? And theese funs are NOT able to NOT call
themselves so local NON-recursive functions are missing in core erlang ...
I'm not sure i really get what "local function" means : funs or functions
local from a module perspective. If it's the latter then i don't
understand why the calling code should treat recursive functions
specifically, because the calling code just call a function and don't have
to know what this function does, does it ?

Thank you

Ludovic

( any option to have Reply to header set to   
automatically on this mailing list ? )


Le Thu, 22 Aug 2013 18:41:22 +0200, Robert Virding
<> a écrit:

> While the Erlang compiler stacks let this is not really necessary as  
> Core does supports nested calls. It is really not defined in which order  
> the arguments will be evaluated, which is one reason why Erlang does the  
> explicit nested lets. In one sense there it makes no difference as the  
> resultant code will be the same, however the optimisation passes of the  
> compiler more or less assume the flattened nested form.
>
> There is one thing missing in Core and that is non-recursive local  
> function definitions. Using letrec defines a recursive function so if  
> you want to reuse local function names as local to a block you can't,  
> you have to invent a new name each time. Almost trivial but still  
> annoying.
>
> Robert
>
> ----- Original Message -----
>> From: "Ludovic Demblans" <>
>> To: 
>> Sent: Saturday, 3 August, 2013 3:50:36 PM
>> Subject: Re: [erlang-questions] Core erlang wildcards and sequences
>>
>> Ok so i'll continue to stack let expressions, it seems simple.
>>
>> Thanks for the replies,
>>
>> Ludovic
>>
>>
>>
>>
>> Le Thu, 01 Aug 2013 15:57:30 +0200, Anthony Ramine <> a
>> écrit:
>>
>> > Hello,
>> >
>> > Replied inline.
>> >
>>
>>
>> --
>> Utilisant le logiciel de courrier révolutionnaire d'Opera :
>> http://www.opera.com/mail/
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>


-- 
Utilisant le logiciel de courrier révolutionnaire d'Opera :
http://www.opera.com/mail/



More information about the erlang-questions mailing list