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
Merge yaya into recursion-schemes? #76
Comments
|
(we've already discussed some of this on Twitter, but let's re-hash the argument for the benefit of everyone else)
In One advantage of using a type family is that we can give it a default implementation. In one of my other projects, I am working on deriving associated types using generics, and I think it might make sense one day to use I should mention, however, that when implementing recursion schemes
That's a pretty big difference: on the contrary, one of the breaking changes I am planning (and which I have not yet discussed with the rest of the maintainers) is to remove
I should mention, however, that if you do go through the trouble of defining strict base functors and carefully distinguishing between data and codata, you get the benefit that
I would definitely be in favour of merging |
I like the idea, but |
That's another big philosophical difference: I think names like |
|
I'm on board with all of this. When I realised the power of
I have to admit this is also quite attractive. Perhaps there is another way we can get this without needing |
I haven't read Gibbons' paper yet, sorry. Are you saying that |
I agree that we should de-emphasise
I'm not sure about |
And FWIW, discussing anything on Twitter with a goal to make any decisions is terrible idea. Stuff get simply lost there. |
|
That's better argued with an example, e.g. how |
Technically list and peano naturals in this example are |
Oh, I definitely think |
I agree that datatypes generated using generics are unreadable; this is precisely the problem which I want to address in my |
Theres a lot going on in this thread. Perhaps it's worth breaking this apart into smaller PRs and then once you're happy with planned rewrites/improvements @gelisam, we can revisit what yaya still has to offer? I mean things like whether or not we have Mu seems fairly tangential. GitHub doesn't have great tools for complex discussions, but multiple issues is a bit more manageable. I'm not a maintainer though, so it's your call! |
Sure, good idea. |
I’ll come back to the rest of this stuff later, but quickly …
the README should probably say “naïve composition of hylo φ ψ ≅ cata φ . ana ψ
meta ψ φ = ana ψ . cata φ -- what this refers to You can see that |
@sellout said he hopes to eventually get yaya merged into recursion-schemes, rather than splitting the user base. I'm more concerned with duplicating our efforts, but whatever: it's a good idea in theory. But does it work in practice? It wouldn't make much sense to just merge everything as-is, as we would end up with two versions of every recursion scheme and it would be confusing for users. Or would it? Perhaps there are legitimate reasons for offering two versions of the same recursion scheme, e.g. some packages offer a strict and a lazy version of the same API. Or perhaps there is a generalization of our APIs which makes sense, and then users can specialize that API to get the features they need in their particular project.
So let's look at the concrete differences (conveniently listed in the yaya documentation) and for each one, decide whether one approach is better, whether it makes sense to provide both, and or whether they can be unified under a more general API. If for almost all the features it ends up making sense to provide both, then I don't think merging the two projects is worthwhile, but we can discuss that too.
The text was updated successfully, but these errors were encountered: