dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.91k stars 785 forks source link

More Option functions #980

Closed ploeh closed 8 years ago

ploeh commented 8 years ago

In the F# User Voice forum, there's a suggestion to add various functions to the Option module. These include:

I often find that I need better building blocks for option values, and while they're easy enough to define, I think it would make the F# language more productive if these fundamental functions were already present.

I'll be happy to write the tests and implementation and send a pull request for this, but I'm opening this issue first, in order to gauge the interest.

If there's interest, I'll get started on some pull requests, but if there's no interest, please close this issue and the User Voice suggestion.

smoothdeveloper commented 8 years ago

Please consider reviewing @vasily-kirichenko answer in this user voice, there seems to be many other existing resources to draw from, should we prepare a RFC so we can discuss naming / signatures to greater extent?

Definitely agree that having more extensive support over Option in the core library makes lots of sense.

dsyme commented 8 years ago

Closing as this will go via UserVoice per CONTRIBUTING.md

ploeh commented 8 years ago

@dsyme, could you please advise how to move forward with these suggestions?

The User Voice suggestion that I already linked to has been inactive for more than a year. In order to get the ball rolling, I wanted to restart the discussion.

The problems with User Voice are:

A GitHub issue solves these problems.

Per CONTRIBUTING.md I could have sent a pull request, since there already is a User Voice suggestion. I did, however, consider that suggestion poorly specified, which is the reason I wanted to restart the discussion.

I am, as written above, offering to implement the Option features, but now I don't know how to proceed... Please advise.

dsyme commented 8 years ago

@ploeh I will mark the UV item as approved-in-principle which means we can open an RFC on it and have a really proper discussion about the Option module.

However the best way to help would then be to volunteer to help do facilitation work on setting up RFCs for approved UV items, per my tweet here :) Basically I'd give you access to FSharpLangDesign to set up about 20-40 RFCs, one for each approved-in-principle issue, and then we as a community can get to work on the details and discussions.

ploeh commented 8 years ago

@dsyme I'll be happy to help to the best of my abilities. The process isn't entirely clear to me, though. Should I just take one of the documents at https://github.com/fsharp/FSharpLangDesign/tree/master/RFCs (e.g. https://github.com/fsharp/FSharpLangDesign/blob/master/RFCs/FS-1007-xxx.md), rename it in fill in the blanks?

If so, I'll be happy to do so.

enricosada commented 8 years ago

wait a bit @ploeh , i already done that for this issue :smile: You can help with another, i was trying to do rfc for this one because was closed in visualfsharp, so we can continue discussion in RFC as @dsyme said. Sry, didnt see you want to contribute to RFC

ref fsharp/FSharpLangDesign#60

@ploeh i pushed the RFC and there is a template https://github.com/fsharp/FSharpLangDesign/blob/master/RFC_template.md

dsyme commented 8 years ago

@ploeh @enricosada Yes, basically, feel free to send a PR creating the RFC for any approved-in-principle issue. First in first served. If you want to grab the token then send one doing nothing but renaming the file, and then fill in the further details.