2 ms·
One of the biggest differences from a C style switch/case is that you can use regular expressions and a few other niceties in each of the when() clauses. if yo
by simcop2387 16y ago
One of the biggest differences from a C style switch/case is that you can use regular expressions and a few other niceties in each of the when() clauses. if you're comparing it to the older Switch module then the biggest difference is that you're not likely to want to shoot the author of the module. Switch being a source filter can be very dangerous (not because it's a security risk but because combining them can cause all kinds of heisenbugs)