Breton Slivka wrote: > On Sat, Dec 6, 2008 at 9:57 AM, Michael Day <[EMAIL PROTECTED]> wrote: > > > (1) Expression lambdas: lambdas whose body is an expression. > > > > var x = lambda(y, z) y + z > > > > Solves the problem with completion leakage, solves the nested > > return/break/continue issue. However, quite limited in usage, and makes it > > difficult to use lambdas to replace functions as they can't contain loop > > statements. (Hello, recursion! :) > > [snip] > > 2) It would be really nice to have a callable value that was > garaunteed not to have side effects. a lambda with an expression body > might not be that. Nevertheless, this would enable a parallelized > array "map" function that's safe to use. In the absence of "real" > multithreading, this kind of parallelism would be a boon for > applications like 3d games, or image processing. >
This little comment got lost in the recent deluge of emails, but I too would really like some mechanism to avoid or see if a function causes side effects (and not just mutability). _______________________________________________ Es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

