“In cases where” vs. “If”
Garner's Modern English Usage (2016), p. 147:
H.W. Fowler wrote of case: "There is perhaps no single word so freely resorted to as a trouble-saver, and consequently responsible for so much flabby writing" (FMEU1 at 65). Arthur Quiller-Couch condemned it is "jargon's dearest child." On the Art of Writing 106 (1916).
The offending phrases include in case (better made if), in cases in which (usually verbose for if, when, when, or whenever), in the case of (usually best deleted or reduced to in), and in every case (better made always, if possible).
Microsoft Manual of Style (2012), p. 311:
To avoid ambiguity, use if to express a condition; use whether to express uncertainty, and use when for situations requiring preparation or to denote the passage of time.
I have a technical paper with the following passage:
Simple vs. associative arrays
In cases where you need key–value pairs, use associative arrays; otherwise, use simple ones.
// A simple array. Items = ["x", "y", "z"]
// An associative array. x:10, y:15, and z:20 are key-value pairs. ItemPrices = ["x": 10, "y": 15, "z": 20]
Currently, I use in cases where; another possible option is in cases in which. Both versions seems to be very accurate, but quite wordy.
Possible shorter versions:
a) If you need key-value pairs, use associative arrays; otherwise, use simple ones.
b) If you need key-value pairs, use an associative array; otherwise, use a simple one.
Version B uses the singular form which I don't like.
Version A looks ambiguous to me. It lacks a point that each array can contain many key-value pairs.
My questions:
-
Is it correct that version A is ambiguous?
-
Is it a good case to use "old, dated, boring" replacement (in cases where or in cases in which) instead? Or there is a better way to fix this issue?
Solution 1:
I did not think A was ambiguous, but I know the subject well enough to not notice.
I do, however, think you have a point and option B eliminates any possibility that a novice might misconstrue the wording in the way you foresee.
The case for case is really just opinion in most cases. If seems to be more clear in this case though, and simple phrasing "gets out of the way" of the real task of learning the material.