-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pipe last implementation #53
Comments
It's feasible to do, but I'd be concerned about increasing bundle size on the JS side, for a feature that isn't a "primary" concern for JS-only work. For now, I added a promise/test/native/test_ffi.re Line 8 in 6b9ff51
On JS, the module is empty, because we want to forward to BuckleScript's operator: Lines 230 to 231 in 6b9ff51
On native, the module defines the operator for unary functions (it's the desugared syntax, but promise/src/native/promise.rei Lines 222 to 224 in 6b9ff51
This is good enough for most uses, which are partially-applied binary functions from Obviously, using Note that the pipe operators might become less important over time, as people switch more and more conclusively to OCaml 4.08+ on the native side, and BuckleScript releases a Reason with |
Thanks for always providing such elaborate and thoughtful answers! I had entirely forgotten about let-operators pretty much solving this completely! Personally, I can see how it makes sense to wait, that considered. 🙂 |
Previously Promise was pipe-last. Within the BuckleScript the main API's are pipe-first (a separate discussion 😄). For me, who's also interested in the native side, where pipe-last undoubtedly is the norm, what would be your view on providing both options?
The text was updated successfully, but these errors were encountered: