On 06/27, Yann Orlarey wrote:
>
> The current implementation of letrec is extremely simple and
> almost like syntactic sugar,
Yes, but I'm afraid it is only simple to you and other faust devs ;)
Once I was greatly puzzled why letrec doesn't work as I'd expect, and
I had to dig into the compiler sources to understand.
For example, I think it is not immediately clear why this code
process = _ : bug;
bug = x,y letrec {
'x = _;
'y = 0;
};
doesn't even compile. IIUC, this is because buildRecursiveBodyDef() turns
the code above into something like
LETRECBODY = \(x, y).( ... ) ~ (_,_);
// makeRecProjectionsList()
x = LETRECBODY : _,!;
y = LETRECBODY : !,_;
Perhaps letrec needs more documentation? In particular, the doc could
explain that yes, it is just syntactic sugar, and you can always avoid it.
And I recall I have already asked this question, but nobody replied. See
https://sourceforge.net/p/faudiostream/mailman/message/36587927/
and this reminds me that I'd really like to have a better way to name the
outputs ;)
Oleg.
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users