match (width == auto, margin_left == auto, margin_right == auto) {
(false, false, false) => { ... }
(false, false, true) => { ... }
(false, true, false) => { ... }
(true, _, _) => { ... }
(false, true, true) => { ... }
}
C-style switch isn't powerful enough to handle this due to the _ wildcards, so in a language without pattern matching you'd have little choice but to fall back to a chains of ifs and Boolean operators, which would make the code hard to read (and CSS layout code is notoriously time-consuming to debug, so anything that makes code easier to read is extremely valuable in practice). The compiler checks to make sure all cases are handled too.This sort of thing has made Servo's layout much easier to understand.