Peter Strøiman

My feedback

  1. 270 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    17 comments  ·  F# Language  ·  Flag idea as inappropriate…  ·  Admin →
    Peter Strøiman supported this idea  · 
  2. 15 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 comments  ·  F# Language  ·  Flag idea as inappropriate…  ·  Admin →

    This proposal is “approved in principle” for F# 4.0+. It would make a good addition to F#. (I don’t think the loss of purity (e.g. wr.t. ordering of union cases) is a critical problem and I believe you can turn of the DefaultAugmentation in any case)

    Some technical issues may need to be ironed out during implementation.

    If this is done, the Tag properties present on these types should also be revealed, that is covered by a separate item.

    An implementation and testing would need to be provided by someone in the F# community (possibly including Microsoft or Microsoft Research, though not limited to them).

    Implementations of approved language design can now be submitted as pull requests to the appropriate branch of http://github.com/Microsoft/visualfsharp. See http://fsharp.github.io/2014/06/18/fsharp-contributions.html for information on contributing to the F# language and core library..

    I’d be glad to help guide people through the implementation process.

    If you…

    Peter Strøiman supported this idea  · 
    Peter Strøiman commented  · 

    Or even better, have it exposed as static members, so you can write
    List.filter Foo.IsA

    The latter can work better with some cases of type inference, e.g.
    let get<'T> () = instance :?> 'T // instance is declared as an obj

    In that case
    get () |> List.filter Foo.IsA
    Would automatically type infer 'T to be List<Foo>, where
    get () |> List.filter (x -> x.IsA)
    would not, and thus would not compile

Feedback and Knowledge Base