-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
combinator: add S.T #221
combinator: add S.T #221
Conversation
😃 👍 I was thinking about this addition to Sanctuary yesterday! |
Outside of combinators, are we generally for or against providing 2 versions of a function that differ only by an application of |
Against, in general. There are functions— |
Any interest in sanctuary-js having some 'extension' libraries? I would personally love a core Sanctuary that was as tiny as possible, with some extra libraries that leveraged the core functions to provide helper functions (in which category I would place both |
Along the lines of sanctuary-int, perhaps? In general I'm in favour of modularity, but in JavaScript modularity poses some problems. Were we to break Sanctuary into ten small modules, say, one would likely need to import several of these modules in any given file. This is not a problem in and of itself, but what would one name these variables? Having everything attached to One could, though, provide a pure method for extensibility along these lines: const sanctuary = require('sanctuary');
const S = sanctuary.create({
checkTypes: true,
env: sanctuary.env,
extensions: [
require('sanctuary-foo'),
require('sanctuary-bar'),
require('sanctuary-baz'),
],
}); This would impose a uniqueness constraint on the names of the exported properties of What do you imagine the "tiny core" would include? How might the remaining functions be divided? I imagine |
It has already been merged, but I find the name |
Yes, that sort of thing. Starting with your last question
Well, casting my over the functions, I would guess
I think that might be a sensible subset?
Yes, merging 'function bags' can be a bit of a pain in JS, it's true. If Sanctuary (or, under my scheme, perhaps one of its 'extensions') had a
I think ideally some 'Sanctuary extensions' would be developed outside of the aegis of var S = merge
( require('sanctuary')
, { string: require('sanctuary-strings')
, list: require('sanctuary-list')
, object: require('rjmks-heterodox-sanctuary-objects')
...
}
) and then (Though actually I might just destructure the various packages with disambiguation as necessary) |
Here's my ideas on extensions: sanctuary-js/sanctuary-def#74 |
I'd like to deprecate
I imagine the implementations of
Thanks for opening that issue, Aldwin. The thread of a merged pull request (for a humble combinator) is not the ideal forum for such an important discussion. |
In preparation for the upcoming v0.11.0 release I'm updating a rather large project to run against
sanctuary-js/sanctuary#master
. Now that we're embracing curried functions (#182), combinators seem more useful than ever (andT
seems more useful to me thanA
).