Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow to use delegate constructors as functions #760
Allow to use delegate constructors as functions
Similar to the suggestion Allow to use struct constructors as functions, it would be nice if we use constructors of delegates as functions.
The existing way of approaching this problem in F# is creating wrapper functions.
let x = System.Converter<_, _> string // ok let y = string |> System.Converter<_, _> // FS0805: Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. let z = string |> (fun x -> System.Converter<_, _> x) // ugly
This is especially useful for making
Pros and Cons
The advantages of making this adjustment to F# are consistency, conciseness, blah, blah
The disadvantage of making this adjustment to F# is none that I can think of.
Estimated cost (XS, S, M, L, XL, XXL): S
Both were completed for F# 4.0.
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply: