Status of F# 4.0+ Approved Language/Library Items

The status page has moved to GitHub

 

This page is being kept for archival purposes

 

 

Language (Approved + Designed Items)

Feature Area Assigned To Pull Request Status
Printf units of measure Language @dsyme PR committed
Extension property initializers Language Edward Paul PR in progress - does not build, needs rebase on fsharp4
Non-null provided types Language @dsyme PR committed
Class names as functions Language @dsyme PR committed
Static params for provided methods Language @dsyme PR committed
Allow use of "FSharp.*" Language @dsyme PR committed
Multiple interface instantiations Language @dsyme PR under review
Printf interpolation Language @v2_matveev Early prototype  cut for 4.0
Implicit quotation of arg expressions Language  @dsyme PR in progress - does not currently build
Extended #if grammar Language  Marten Range PR in progress - minor bugs remaining, needs IDE validation
 Automatically convert captured mutable locals into refs Language Matthew Parkinson PR committed
Tag and Is on DUs Language      cut for 4.0
Improved optional parameter interop Language      cut for 4.0
Support for 'fixed' Language      cut for 4.0
Wildcard 'self' identifiers Language      cut for 4.0
Enhance ReflectedDefinition for pattern-match-let-bindings Language      cut for 4.0
Enable a compiler-warning when a recursive algorithm is not tail-recursive Language  @dsyme  started  cut for 4.0
Rational exponents for units Language Andrew Kennedy PR committed
Provided C#-style extension members language @dsyme PR in progress - issue exists requiring multiple `open` statements; intellisense complications
Add a module of efficient non-structural equality/comparison operators

Language/
Library

@dsyme PR committed

Library: Other

Feature Area Assigned To Pull Request Status
 Better async stack traces Library @dsyme PR committed
Quotation format improvements Compiler+Library @dsyme PR in progress - does not currently build
add WebClient.AsyncDownloadFile/Data Library mexx24 PR committed
Add an active pattern to match constant decimal in quotations Library  Veritax  PR committed
Async.AwaitTask for non-generic task Library @thinkb4coding PR committed
String.filter and Option.filter Library @rojepp and Mark Seeman PR committed
Slicing syntax for F# lists Library @latkin PR committed
Hash/Eq/Distinct/Group Perf Library (perf) @dsyme PR committed
 Use OptimizedClosures FastFunc consistently Library (perf) PatrickMcDonald PR1 committed
Added NativePtr intrinsics Library Jack Pappas PR in progress - needs testing of cross-targeting scenarios
tryUnbox, isNull, Option.ofObj.toObj, Option.ofNullable/toNullable Library @dsyme PR committed

Library: F# 4.0+ design for regularizing and extending the List, Array and Seq modules

There is an approved proposal to make the functions defined in the List, Array and Seq modules in FSharp.Core.dll more regular and to add some new functions. See also the overall status of F# 4.0+ Language Design Items.

New functions added in this proposal: splitAt, contains, findBack, tryFindBack, findIndexBack, tryFindIndexBack, item, tryItem, indexed, mapFold, mapFoldBack, tryLast, tryHead.

Background

The F# 2.x and 3.x philosophy for these functions was somewhat irregular. The majority of functions (e.g. map, filter, groupBy, averageBy) were defined for Seq, but some were not present on List and Array (e.g. groupBy). This leads to awkward code where Seq-producing functions are used even when List is an input. Seq.groupBy is a particular example.

Also, some functions were not defined on Seq, even though they exist in List or Array.

The proposal below is to complete the matrix for List, Array and Seq w.r.t. functional collection functions.

Review and Completion

This work is only completed when all rows have a status of ":)". The library updates will only be done when all PRs are ready (or features are dropped).

Status column -

:) - reviewed and ready to be pulled

:/ - reviewed but changes needed

(empty) - no PR or not reviewed

If an item is marked "low-pri" it doesn't need to be completed in order for the library update to happen.

Regular functional functions

Function Comment List Array Seq PR Status
append   o o o done :)
average   o o o done :)
averageBy   o o o done :)
contains new ADD ADD ADD done :)
choose   o o o done :)
collect   o o o done :)
compareWith   ADD ADD o done :)
concat   o o o done :)
countBy   ADD ADD o done :)
distinct   ADD ADD o done :)
distinctBy   ADD ADD o done :)
empty   o o o done :)
exactlyOne   ADD ADD o done :)
exists   o o o done :)
exists2   o o o done :)
filter   o o o done :)
find   o o o done :)
findBack new ADD ADD ADD done :)
findIndex   o o o done committed
findIndexBack new ADD ADD ADD done committed
fold   o o o done :)
fold2   o o ADD done :)
foldBack   o o ADD done committed
foldBack2   o o ADD done committed
forall   o o o done :)
forall2   o o o done :)
groupBy   o o ADD done committed
head   o ADD o done :)
indexed new, signature indexed: C<T> -> C<int*T> ADD ADD ADD done :)
init   o o o done :)
isEmpty   o o o done :)
item New, see note. SIgnature int -> C<'T> -> 'T ADD ADD ADD done :)
iter   o o o done :)
iter2   o o o done :)
iteri   o o o done :)
iteri2   o o ADD done :)
last   ADD ADD o done :)
length   o o o done :)
map   o o o done :)
map2   o o o done :)
map3   o ADD ADD done low-pri
mapi   o o o done :)
mapi2   o o ADD done :)
mapFold New, map + fold, with signature mapFold : ('State -> 'T -> 'U * 'State) -> 'State -> C<'T> -> C<'U> * 'State e.g. see here ADD ADD ADD done :)
mapFoldBack New, map + fold, with signature mapFoldBack : ('T -> 'State -> 'U * 'State) -> C<'T> -> 'State -> C<'U> * 'State ADD ADD ADD done :)
max   o o o done :)
maxBy   o o o done :)
min   o o o done :)
minBy   o o o done :)
nth see note long-term deprecate, see note o long-term deprecate, see note done :)
pairwise   ADD ADD o done :)
permute   o o ADD done committed
pick   o o o done :)
reduce   o o o done :)
reduceBack   o o ADD done committed
replicate   o ADD ADD done :)
rev   o o ADD done committed
scan   o o o done :)
scanBack   o o ADD done :)
singleton   ADD ADD o done :)
skip   ADD ADD o done :)
skipWhile   ADD ADD o done committed
sort   o o o done :)
sortBy   o o o done :)
sortWith   o o ADD PR committed
sortDescending   ADD ADD ADD PR committed
sortByDescending   ADD ADD ADD  PR committed
sum   o o o done :)
sumBy   o o o done :)
tail   o ADD ADD done committed
take   ADD ADD o done :)
takeWhile   ADD ADD o done :)
truncate   ADD ADD o PR committed
tryFind   o o o done :)
tryFindBack new ADD ADD ADD done :)
tryFindIndex   o o o done :)
tryFindIndexBack new ADD ADD ADD done :)
tryHead new ADD ADD ADD done :)
tryItem new ADD ADD ADD done :)
tryLast new ADD ADD ADD done committed
tryPick   o o o done :)
unfold   ADD ADD o PR committed
where syn. filter ADD ADD o done :)
windowed   ADD ADD o PR committed
zip   o o o done :)
zip3   o o o done :)

Note: In F# 3.0 Seq.where was defined as a synonym for Seq.filter, mainly due to the use of "where" in query expressions. Given it already exists as a synonym (= decision made) it seems sensible to just complete the matrix and define List.where and Array.where as well.

Note: In F# 3.x, nth is defined with inconsistent signatures for Array and List. The proposal above replaces nth by item and would eventually deprecate nth (with a message to say 'please use Seq.item'. It also adds a corresponding tryItem. Both item and tryItem would take the integer index as the first parameter.

Regular functional operators producing two or more output collections

These operators are not defined for Seq.* for performance reasons because using them would require iterating the input sequence twice.

| Note it is arguable that if these are not defined, then Seq.tail, Seq.skip and Seq.skipWhile should also not be defined, since | they implicitly skip inputs and can be a performance trap, especially when used recursively.

Function Comment List Array Seq PR Status
partition   o o n/a --- :)
splitAt new, taking index ADD ADD n/a done :)
unzip   o o n/a --- :)
unzip3   o o n/a --- :)

Mutation-related operators

Function Comment List Array Seq xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx
blit   n/a o n/a    
copy   n/a o n/a    
create   n/a o n/a    
fill   n/a o n/a    
get   n/a o n/a    
set   n/a o n/a    
sortInPlace   n/a o n/a    
sortInPlaceBy   n/a o n/a    
sortInPlaceWith   n/a o n/a    
sub   n/a o n/a    
zeroCreate   n/a o n/a    

Conversion operators

Function Comment List Array Seq xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx
ofList   n/a o o    
ofArray   o n/a o    
ofSeq   o o n/a    
toList   n/a o o    
toArray   o n/a o    
toSeq   o o n/a    

On-demand or IEnumerable computation operators

Function Comment List Array Seq xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx
cache   n/a n/a o    
cast   n/a n/a o    
delay   n/a n/a o    
initInfinite   n/a n/a o    
readonly   n/a n/a o

Last edited Jan 15, 2015 at 5:03 PM by dsyme, version 104