-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Conflict between LangugeExt Extension methods and LINQ Extension methods #1282
Comments
Not sure how that once slipped through, but seeing as there are workarounds I will leave this until after I have completed my v5 work, which is more important to me right now and I only have limited time (which also includes not dealing with PRs). Workaround
|
Yes these workarounds would fix the problem. However in a large large project adding LanguageExt will affect all the for example List - extension methods since there's no namespace ? Lets say I'm creating a new feature to a legacy product and would like to introduce more functional programming approach. Only workarounds I can think of for this would be to create a own wrapper library. I also understand that creating new namespaces would probably be a breaking change for existing projects. |
Description
Extension methods are not in any namespace thus causing problems in a large project. Instead of Linq - extension methods, the whole project is forced to use extension methods from LanguageExt.
Steps for minimal reproduce
https://github.com/attejan/LanguageExtListExtensionRepro
Expected behavior
The extension methods provided by the library should not conflict with the ones provided by LINQ. It should be possible to use both sets of extension methods without any ambiguity.
Actual behavior
List extension methods from LangugeExt are used and they break.
Possible fix
Iclude all extension methods in a namespace.
Theres probably a reason why it was done like this in the first place, but I would be happy to hear some possible solutions to this problem.
Similar issues
#836
#445
Please let me know if you require any further information or if there's any way I can assist in resolving this issue.
Thanks for this library!
The text was updated successfully, but these errors were encountered: