3 ms·
That's the point, though; you use 'foo' and 'bar' when you want the reader to focus on an abstraction, instead of potentially distracting them with the details
by marssaxman 4y ago
That's the point, though; you use 'foo' and 'bar' when you want the reader to focus on an abstraction, instead of potentially distracting them with the details of a concrete situation.
- ThrowawayTestr 4y agoEvidently the abstraction can also be the distraction.
- jameshart 4y agoOnce the ‘programming bit’ is flipped in someone’s brain, I think metasyntactic variables like foo and bar become very instinctive and easy to reason about. You have activated the part of your brain that visualizes things as abstractions with placeholders. The problem is when foo and bar are used in material aimed at beginning programmers who are still developing that instinct and who haven’t yet got that bit set.
- jkingsbery 4y agoFor example - sometimes people get confused about what is meant by a "faucet," and so using "faucet" as a variable name could lead to confusion.
- civopsec 4y agoI think of a crowbar and martial arts. Ugh, it’s actually much more distracting than the serene A-B-C, X-Y-C, and so on.
- deleted 4y ago[deleted]