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

How do you feel about comma expressions? #1

Open
evilsoft opened this issue Sep 15, 2017 · 1 comment
Open

How do you feel about comma expressions? #1

evilsoft opened this issue Sep 15, 2017 · 1 comment

Comments

@evilsoft
Copy link

evilsoft commented Sep 15, 2017

Not really an issue

Howdy. Curious your opinion of using comma expressions for tappped functions like this. Basically it would turn:

const fn = (tagName, val) => {
  console.log(`[${tagName}]`, val)
  return val
}

into this:

const fn = (tagName, val) =>
  (console.log(`[${tagName}]`, val), val)
@on3iro
Copy link

on3iro commented Sep 17, 2017

I think comma expressions, while being terse, are really hard to read. I would prefer the first example at any given day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants