jashkenas/coffee-script — Issue #1816: Switch...when
Author: johnnywengluu
Created: 2011-11-01 10:25:53+00:00
State: open

Instead of this:

switch req.agent.os.machine and req.agent.family.machine
when "mac-os-x" and "chrome"
// Code 1
when "mac-os-x" and "safari"
// Code 1

Wouldn't it be easier with:

switch req.agent.os.machine and req.agent.family.machine
when "mac-os-x" and "chrome" or "safari"
// Code 1

This would make it more DRY.