Open SandroMaglione opened 3 years ago
Apologies for not getting back to you earlier @SandroMaglione!
I haven't had much time for working on dartz
recently and I somehow missed this ticket...
Thanks for your kind words – fpdart
looks absolutely amazing too!
As for roadmap, there really isn't a concrete one. Improving the very poor state of documentation is something that a lot of users have requested. I of course also want to keep up compatibility with new Dart SDK versions, as well as make the library more complete in general, but I have no real todo list.
I would also really like to shed all the dust from dartz
's beginnings as a Dart 1 library. dartz
had a long period where it was cross compatible with both Dart 1 and Dart 2, which gave rise to several awkward constructs. By clearing out the cobwebs and fully embracing the new language constructs introduced on the Dart 2.x track, I believe the library would look cleaner, be nicer to use and be more maintainable. On the other hand, maybe that time would be better spent contributing to fpdart
instead? :-)
Hi @spebbe
Thanks for your response. dartz
is an awesome package, which introduced functional programming in dart. Before starting fpdart
, I have been reading the code of dartz
, which has always been my main inspiration for fpdart
and functional programming in general.
If you'd like to contribute to fpdart
it would be awesome! Let me know if you need any guidance or help if you ever decide to invest some of your time in fpdart
.
Thank you again for the work that you have done during all these years on dartz
🙏🏼
Been using dartz
and also fpdart
for a while now, thanks for the work guys!
One thing that has always bugged me a little, is that the functions are all attached to classes rather than being functions all the way down. I guess the main reason for this, is that creating a pipe
function that is nice to use isn't really possible!
Been playing with an idea using extensions to work around this: https://github.com/tim-smart/fpdt Example of function composition: https://github.com/tim-smart/fpdt/blob/main/test/function_test.dart#L6
Enables you to do things like:
import 'package:fpdt/function.dart';
import 'package:fpdt/option.dart';
Option<String> optionOfString(String? s) =>
fromNullable(s).chain(filter((s) => s.isNotEmpty));
final maybeParseInt = optionOfString.compose(chainNullableK(int.tryParse));
Going to give this pattern a go in a few projects, and see if it has any merit!
Used this in a few projects and I'm really liking this pattern.
I found that it pushes me towards composability - creating small re-usable functions.
Hi @spebbe
The package is awesome and it is also really popular on pub 💯
I would like to ask if you have in mind a roadmap for the future of dartz. It could be also useful for possible contributors to know what could lay ahead and what changes, improvements, or/and additions could be made to the package.
Do you have something in mind? Does the package need some improvements or contributions? Is there something missing that should be implemented from cats, scalaz and the standard Haskell libraries?