paldepind / union-type

A small JavaScript library for defining and using union types.
MIT License
477 stars 28 forks source link

Remove parentheses around single argument #14

Closed gheoan closed 8 years ago

gheoan commented 9 years ago

Parentheses around the single argument are not required. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

davidchambers commented 9 years ago

LGTM

raine commented 9 years ago

Somehow I find the version with parentheses easier to parse visually, but it could just be that I'm used to it from livescript.

paldepind commented 9 years ago

I personally feel that making the parentheses optional was a mistake since it is only allowed in one specific case. I also agree with @raine about readability.