11

fslang-design/FS-1115-InlineIfLambda-in-FSharp-Core.md at main · fsharp/fslang-d...

 2 years ago
source link: https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-1115-InlineIfLambda-in-FSharp-Core.md
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

F# RFC FS-1115 - Tracking the use of InlineIfLambda in FSharp.Core

F# 6 added the InlineIfLambda feature.

This is a long-running pre-approved RFC tracking the use of this feature in FSharp.Core.

NOTE: It appears to make sense to just go through FSharp.Core systematically and use it on every inlined function that takes a lambda which is only applied once

NOTE: It is likely inline could be used more widely across FSharp.Core as well

Approved uses in FSharp.Core 6.0.0

  • Array.map
  • Array.iter
  • Array.minBy
  • Array.compareWith
  • Resumable code and tasks

NOTE: this list appears adhoc and we should be systematic, hence this RFC

Approved uses in current preview

Drawbacks

  • There are no known drawbacks of using this with the above functions.

Alternatives

  • Don't use it

Unresolved questions

  • Other uses

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK