> Le 7 oct. 2018 à 20:21, Oleg Nesterov <o...@redhat.com> a écrit : > > Hi Stéphan, > > thanks for your reply, but I don't really understand you... > > On 10/07, Stéphane Letz wrote: >> >> Concerning « Foreign functions � > > I am starting to regret I mentioned ffunction ;) I did this only to make my > email more clear. > >> they are supposed to be side effects free, > > Yet infereFFType() returns makeSimpleType(kSamp) if ffarity(ff) == 0. > > If this case is supposed to be side effects free too, then why infereFFType() > has to check ffarity() at all? > > It even has a comment: > > // case of functions like rand() > > >> see the "faust-quick-reference » : > > OK, I have to admit that I never read the docs, will do. > >> Foreign functions with input parameters are considered pure math functions. >> They are therefore considered free of side effects and called only when their >> parameters change (that is at the rate of the fastest parameter). > > Exactly. Foreign functions with input parameters. But my test-case uses > foreign function without input parameters, its ffarity() == 0. > > But again, this doesn't really matter. My only point is that faust should not > evaluate the "nontrivial" delay expression more than once, with or without > ffunction(). > > Oleg. >
Yes sure I see your point. About foreign functions, we’ll probably have to be more explicit about them, depending if their have side effect or not, since this has obvious consequences in the way the code has to be compiled. This also related to what Julius just said. Stéphane _______________________________________________ Faudiostream-devel mailing list Faudiostream-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-devel