You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the removal of global lazy evaluation, in-line lambda definitions with no arguments, such as (@ f => ...) no longer work when passed as an argument to something, as they are just evaluated immediately. This is, obviously, not how it's supposed to work, but not evaluating them as a side-effect of the lazy evaluation seems like a potentially buggy solution, too. The best solution would probably be to hardcode argument evaluation to only be performed on specific types, thus avoiding the problem.
The text was updated successfully, but these errors were encountered:
Purposefully not evaluating them won't work. The only way to call a function in the language is to simply use it. If a function has no arguments, it will get called immediately.
Alternative solution: Add a funcmod for denoting that a function is not functional and must be explicitly called. Calling the function then would require a separate function, maybe something like call. It might also make sense to apply the funcmod automatically to a lambda with one argument, since that isn't usually going to be useful. Or maybe just make a no-argument lambda a syntax error as the only thing you can really do with it that you can't do with just a normal compound is an infinite recursion.
Due to the removal of global lazy evaluation, in-line lambda definitions with no arguments, such as
(@ f => ...)
no longer work when passed as an argument to something, as they are just evaluated immediately. This is, obviously, not how it's supposed to work, but not evaluating them as a side-effect of the lazy evaluation seems like a potentially buggy solution, too. The best solution would probably be to hardcode argument evaluation to only be performed on specific types, thus avoiding the problem.The text was updated successfully, but these errors were encountered: