-
Notifications
You must be signed in to change notification settings - Fork 26
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
Positional sugar for operators that usually take one arg #230
Comments
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: This makes the common case (a single value and no options) more ergonomic. Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3421
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Subscribers: vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3422
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Subscribers: vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3423
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3424
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3425
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3426
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Subscribers: vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3427
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3428
appsforartists
added a commit
that referenced
this issue
Oct 11, 2017
Summary: Part of #230 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, vietanh Reviewed By: #material_motion, vietanh Tags: #material_motion Differential Revision: http://codereview.cc/D3429
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The named arguments pattern is great for functions that take multiple arguments. We moved all operators to it in #193. However, there are some operators that usually take a single argument; they have been made harder to read and to use by the transition.
Therefore, I'm going to go back and add positional sugar for operators with one primary argument:
added/subtracted/multiplied/dividedBy
distanceFrom
log
pluck
isAnyOf
rewriteTo
threshold
startWith
merge
appendUnit
_map
_tap
_filter
_slidingWindow
For consistency, they will keep their named argument signatures as the primary entry. The positional alternative is just sugar, because this:
is easier to read and to write than:
The text was updated successfully, but these errors were encountered: