[RFC FS-1098] "Inline if lambda" attribute on function parameters of inline functions #549
dsyme
started this conversation in
Language and core library RFC discussions
Replies: 2 comments 5 replies
-
Will this also allow capturing byref types in the lambda? For example allowing something like this if let copy (source: int[]) (target: Span<int>) =
source |> Array.iteri (fun i x -> target.[i] <- x) |
Beta Was this translation helpful? Give feedback.
4 replies
-
Hey, I would have needed this quite often and the workarounds most often turned out to be code-duplication and less abstraction, so I would love to see that happen. I was wondering why we can't just inline all lambdas in functions being inline themselves when there is only one (syntactic) invocation? This rule would ensure that the code-size keeps small and cover a lot of cases. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion thread for RFC FS-1098 Inline if lambda attribute
Beta Was this translation helpful? Give feedback.
All reactions