Github user muratsu commented on the pull request:

    
https://github.com/apache/cordova-plugin-camera/pull/111#issuecomment-127409849
  
    Sorry didn't see your comment earlier. 
    In terms of perf, I think this the usage of `if/else` vs `switch` is not 
really important here. Since we're only executing it once, the perf difference 
is not going to be noticable either case.
    Readability is a bit more subjective - I don't have a preference in this 
case. I tend to use switches only when I have fall-through cases. 
    I wasn't familiar with `switch(true)` pattern. It seemed like an 
anti-pattern to me at first but looks like it is a common pattern in dynamic 
languages. I'll revert it back to switch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to