Skip to content
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

reconsider func-call-spacing #1208

Closed
smuemd opened this issue Oct 3, 2018 · 3 comments

Comments

@smuemd
Copy link

commented Oct 3, 2018

What version of standard?
^12.0.1

What operating system, Node.js, and npm version?
OSX, node v8.9.3, npm v6.4.1

What did you expect to happen?

This is a proposal:

When applying a function,

  1. allow a space before the opening paren.

These styles are currently allowed in standard

f(x, y, z)

f(x)(y)(z)

f(g(x, y), h(z))

f(g(x)(y))(h(z))

This proposes to also allow the following call styles (effectively not enforcing eslint rule http://eslint.org/docs/rules/func-call-spacing)

f (x, y, z)

f (x) (y) (z)

f (g (x, y), h (z))

f (g (x) (y)) (h (z))

Rational
This addresses readability problems associated with )( style when dealing with regular curried functions.
For example:

// defining get as curried function
function get (prop) {
  return function (obj) {
    return obj[prop]
  }
}

// calling get
get ('foo') ({ foo: 'bar' })

(for more context see sanctuary-js/sanctuary#438)

Note that this has been previously discussed in issue #530
Reconsidering your stance on func-call-spacing may help better accommodate functional programming styles.

@stale

This comment has been minimized.

Copy link

commented Jan 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 1, 2019

@brodybits

This comment has been minimized.

Copy link
Contributor

commented Jan 1, 2019

??

@stale stale bot removed the stale label Jan 1, 2019

@stale

This comment has been minimized.

Copy link

commented Apr 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Apr 1, 2019

@stale stale bot closed this Apr 8, 2019

@lock lock bot locked as resolved and limited conversation to collaborators Jul 9, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.