NetFabric/NetFabric.Hyperlinq

Why not make method signatures identical to linq?

friuns2 opened this issue ยท 5 comments

Hi

So when i replaced linq with hyperlinq, it wont compile right away i had to change all linq parts
for example
.Where(a=>a!=null) to .Where((a,i)=>a!=null)

image

Why not make method signatures identical to linq? is it even possible? i couldn't think of anyhting without closure allocations.

Hi @friuns2

I'm using value types for the enumerators and interface constraints but both force me to add the explicit implementation of each operator on every enumerator. This makes the number of lines explode exponentially, making it hard to maintain and easily introducing bugs. For that reason I was limiting the number of overloads for each operation. I decided to only support predicates and selectors with indices, where the index can be ignored but, I agree with you.

I now changed strategy and I'm developing a Fody addin that automatically generates all these operations. It's taking a bit of time but the next version will support LINQ signatures and much more...

Thank you for letting me know you're trying to use this project. It's been too quiet around here... ;)

thats only linq project thats usuable keep it up! others like LinqAF is 20+mb dll because too much code generated, https://github.com/adamsitnik/slinq is abounded and https://github.com/eldereal/uniq is just slower ;)

@friuns2 Just to let you know that I'm still working on this. I'm automating some of the development to make it easier to add new operations. It's taking some time but it will be worth it. It's all in the Fody branch: https://github.com/NetFabric/NetFabric.Hyperlinq/tree/Fody

@friuns2 I finally relased a package with identical method signatures to LINQ. Please check the latest version on NuGet (still in beta). Check the README for usage documentation.

Thanks!