-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add DateTime Module functions #465
Conversation
I think this needs some discussion, however no need to open an issue, we can also discuss here. IMHO, the goal of this library shouldn't be to re-write all framework functions in pipe friendly way, and I agree with @dsyme when he states that we should instead embrace dot notation as it's a key feature of F# interoperability. Having said that, we probably have some functions already in the String module which are or look like a re-write, but they also add the value of being context insensitive. My feeling is that a DateTime module should bring an additional value, not just a whole rewrite, but if you feel that some functions should be made pipe friendly let's start by compiling a specific set of them, or even better some use cases where operating with the current set of functions become problematic. PS: One function that I miss and would like to add is something like an efficient implementation of to/of Unix Time. |
There is an RFC to make OO style entity access more palatable in F#. |
The point of the RFC is for cases like That is, even with the RFC the recommendation would always be to use |
Indeed @dsyme. I used an overly broad categorisation of the RFC. |
Thanks @dsyme for your clarification
note that the case being discussed here is mostly forward piping, I guess that's what you consider a valid reason. |
Yes for
but I'd imagine almost never for
though I guess we'll see
|
Yes, looks like we're on the same page, I agree there's no reason to write |
Closing this for now for the above reasons, we'll need to compile first a list of functions that have a specific justification. Feel free to reply with a list of functions and we'll keep discussing and eventually re-open the PR. |
This module just adds the instance functions of DateTime, this helps to use it in the
pipe style
and helps the type inference (when we want to use those functions we have to manual type the arguments)wdyt? should I open an issue for that too?