Treat SAM classes's (using ...)
argument lists as contextual
#17671
makkarpov
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, constructs like
Foo ?=> (Bar, Baz) => Qux
causes two function objects be allocated on heap. This may be especially costly on repeated invocations, as there is no way to cache second function. Usually, performance-sensitive spots are highly specialized, so someone might want to replace such declaration with a specialized trait:However, currently it doesn't work as expected:
Feature request is to unify behavior of such SAM lambdas with currently present behavior of context functions.
Beta Was this translation helpful? Give feedback.
All reactions