Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upExpected a default case. #20
Comments
This comment has been minimized.
This comment has been minimized.
|
So, you want to write I don't feel strongly about enforcing this rule and would happily remove it if there's support. I think fall-through from a Anyone opposed to relaxing this rule? @mafintosh @maxogden |
This comment has been minimized.
This comment has been minimized.
|
The only advantage with the switch in this case is the implicit LHS of the expression, its like a IMHO, my list is: ++ Shorter, less repeat of case "a": return 0
case "b":
return 1
case "c": {
return 2
} |
This comment has been minimized.
This comment has been minimized.
|
I'd be in favor of relaxing this rule. |
This comment has been minimized.
This comment has been minimized.
|
Right, I was just arguing against a To say otherwise would be equivalent of saying every |
This comment has been minimized.
This comment has been minimized.
|
my thoughts: |
feross
closed this
in
969ce31
Feb 5, 2015
This comment has been minimized.
This comment has been minimized.
|
Okay @mafintosh One-line |
jonathanong commentedFeb 4, 2015
ex:
and i'd make those cases one-liners if i know none of the cases are going to be multiple lines