-
Notifications
You must be signed in to change notification settings - Fork 75
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
Either verbosity #50
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am testing this library with one project, however either type seems insanely verbose. Heres my code
Basically this parses json that kubernetes returns and then runs bunch of other terminal commands based on that information + logging. Usual stuff. Those complex generics however really reduces readability of code so i am asking advice is there other solutions to reduce noise or even refactor this alltogether to get better readibility? Theres some things i dont grasp yet.
There was issue about implicit casting as option which was denied since it creates its own problems. I agree totally with simple Option type, however on either version of it it reduces generic that and that boilerplate greatly. LanguageExt uses that solution with either which is nice, however that library API is kind of mess on other areas.
Another way i figured out could be to use static imports, however that is blocked since generic is given as part of method not type. Eg. Option<T,TE>.Some() vs Option.Some<T,TE>().
Is only thing left to refactor those generic definitions out with helper methods to shorten calls?
The text was updated successfully, but these errors were encountered: