-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap V2.0 #288
Comments
I would like to organise namespace so that we: 1) can more easily generate docs per functional area (thinking of how operations is separated nicely into sections by banner comment, but API docs are resorted alphabetically and all at same level), 2) reduce possible instances by opening only what you're using. The later requires to split the Invokables so that each implentation sits with the 'openable' type. Such as Arrow, or NonEmptyList, etc. This should help considerably with compiler error messages as there is reduced implementations. I also wonder if it would help speed up compiler time? I'm not exactly sure on how to arrange for optimal dev work flow, but could be that there is separation between common and exotic abstractions, or maybe that there is 'open common' and otherwise opt in for each type... WDYT? |
No doubt namespaces should be re-organized. I personally don't see a big benefit on splitting Invokables in different namespaces, but at the same time I don't see any harm on doing that, since they are rarely used in client code directly. Separation between common and exotic abstraction could be interesting but hard to draw the line. One thing I definitely would like to change is a few extensions (like So I would say, if/when you have a concrete proposal in mind please drop the details and we can analyze it, because this is the right time to do it ;) |
I would vote for defaulting to left for success right for error |
You could consider removing functions that are part of FSharp.Core, e.g. Also personally I'd like |
Good point, based on the min version of F# core we could remove some now-redundant functions. Regarding the String.trim suggestions, we can consider some breaking changes for V2, at the very least your alternative suggestion (consistency) should be implemented. |
Thanks! (For the record, my primary suggestion regarding |
Yes, definitely. I think more than 90% of the cases are white-spaces. |
Perhaps there should be a doc site for v1 so that it's possible to browse the docs for v1 and v2 once v2 is available? |
So perhaps a PR @cmeeren with the change? |
Regarding |
Let's discuss it in #322 |
Again regarding |
Yes, if there is subsumption, but AFAIK in that case, the overload which is specific for arrays have priority, so it shouldn't. If it does it is a bug. |
I see. Is there no simple way of having automated tests for this? (I can't think of any at the moment. As you say, it's a hard thing to test.) I know FSharpPlus is all about working at a higher abstraction level, but performance still matters, and it's important for me to have an idea about whether if I replace |
It is also about performance. Some cases are hard to optimize, but this is not the case. I can tell you, in general all 3 main collections (Seq, list and array) are always optimized. Sometimes there are more but those 3 are the bare minimum. I have some ideas of how to test this cases. Feel free to open an issue about testing optimized overload. |
Yes, presenting the namespaces like that is not useful at all. Regarding I am happy to discuss re-organizing namespaces. |
One thing I noticed is that is not possible to use our extensions without opening This is something we definitely need to address. My wild guess is that many users are comfortable using extensions but don't want to use generic code for good reasons and the last thing they want is to have all generic functions in scope. I think this is a must for V2, but we should find a way to address this, if possible before V2. I was thinking in moving all extensions to its own namespace so they can just do something like @wallymathieu do you think having a process of duplicating the extensions in the other namespace would make sense? |
Perhaps. Such a way could be to create a separate library that is the subset (this would be a variant of #328). Using for instance ifdefs in order to have the extensions in different namespaces while keeping the code the same. |
Splitting Extensions in its own dll is definitely another option, we can discuss in #328 it will clearly have some benefits but also drawbacks. Let's assume here in this thread that we don't split the library. What can we do? I think, we can put them in an Extensions namespace and autoopen it, in such a way that:
|
Yes, that sounds like nice user experience. Then you wouldn't need to install a separate lib to get the things that makes sense from a beginner perspective. |
I like that approach. It would be a v2 due to binary changes, though? Practically, how do you achieve I wonder if we could use the same approach for other features? Say, I only want Lens functions? Also, do you plan on using a v2 branch ...? I would like to start on some of these ideas! |
Actually, thinking it through some more, the problem would be that we'd have to put all Extensions in one file. As far as I know, you can't split a module into separate files. You can with a type, and as of F#5 (and 4.7 preview feature) we can open a type, but you can't have nested modules (I think!). It is probably cleaner to use Personally, I think my preference is to make a separate lib. Seems like there are so many utility libs, that don't get wide acceptance and tend to attract fancy, but less commonly used features. An F#+ core could be a very tight, very slowly changing library that tracks F# core. WDYT? |
I'm a bit ambivalent about splitting the library. It's true, some users would like to see the extensions in a separate library, @dsyme for instance told me he likes that part of the library and would love to see it as a separate thing. Let's discuss that option in its corresponding issue #328 (comment) and assume in this discussion that the library will continue as a whole. |
What was the suggestion from @dsyme regarding using the return type for type inference? |
To avoid using SRTPs on the result type, unless it's the only way (ie: We can try remove it in other functions, I'm sure it will be a breaking change, so we'll have to measure the impact and see if it worths. |
I think for V2.0 we can start discussing features here, before moving to a formal project.
What comes to my mind at the moment is:
Remove subsumption from Applicatives: Right now
seq
"eats" all custom types implementingseq
Same for Traversable, same situation: although this might not require a breaking change (todo find out)
Implement IEnumerable for Vectors, now that (1) has to be done.
New
ListT
monad transformer, possibly newSeqT
as well, coded using a similar technique as the one used for Free Monads.Review computation expressions: autosense will be removed but we have to do something to make it easy for users to understand why a strict monad can't be used with the non-strict CE. Maybe make compilation fail when calling a TryWith?
Add ValueTuple, ValueTask and other latest addition to the framework. We can require a higher framework version
Consider suggestions by @dsyme regarding using the return type for type inference.
Am I missing something?
EDIT
Better task support (maybe an intermediate type like
Step
with conversions to/from Task and its use in Bind an other methods for task).Consistent type parameters order, this would need to swap type parameters in
Validation<'err,'t>
toValidation<'t,'err>
.The text was updated successfully, but these errors were encountered: