-
Notifications
You must be signed in to change notification settings - Fork 376
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
Strong #276
Comments
Is Scott encoding same as Church encoding? if not what's the difference |
I'm an atheist and not involved in Church encoding. -- Scott |
@safareli there's an awesome paper on this: https://ifl2014.github.io/submissions/ifl2014_submission_13.pdf Church: Scott: |
I think using an object encoding is more appropriate for JavaScript. See my comment here for a rationale. |
@puffnfresh for non recursive data types both Church and Scott encoding would be same right? |
I'd love to see Scott encoded ADTs in FL. Javascript has multi argument functions, so products are for free. @safareli Yes, both are implemented as continuations. Scott uses functional pattern matching (uncons) to deconstruct recursive types, whereas Church uses a catamorphism (foldr). As a result Scott has explicit recursion (at the type and value level) and Church implicit. |
Instead of Arrow (#273) we should have Strong Profunctor. It probably makes sense to do Choice Profunctor with this.
The occurrences of Tuple and Either should be Scott-encoded so we don't have to directly specify data types.
The text was updated successfully, but these errors were encountered: