http://www.perlmonks.org?node_id=532473


in reply to Re^2: On Quality
in thread On Quality

It means, "avoid arbitrary limits", but the concreteness of "0, 1, or unlimited" is a useful benchmark.

There are sometimes fundamental reasons for imposing limitations like "there can be at most one X per Y" (0 or 1), "there must always be exactly one X for each Y" (1), "no Y can ever have an X" (0). While limitations like "a Y can never have more than 5 Xs" are most often just arbitrary limits.

Arbitrary limits very often come back to bite you. So it is good to have at least some motivation to do the extra (or perhaps just "different") work up-front to eliminate such arbitrary restrictions.

So being at least suspicious of any "at most N" (for N > 1) restrictions is a good habit.

Of course, sometimes 0 or 1 limits are actually arbitrary and (rarely) specific finite limits above 1 are not arbitrary. But the "0, 1, or unlimited" test is very useful.

- tye        

Replies are listed 'Best First'.
Re^4: On Quality (0,1,N)
by Aristotle (Chancellor) on Feb 24, 2006 at 08:40 UTC

    Ah. That is a lot more concrete than the idea I had in mind, though on reflection, it is the same principle.

    This particular thing is something I’ve been doing instinctively – f.ex. one of the reasons to prefer dynamic, garbage-collected languages is that they tend to make this much easier, whereas in something like C, it’s generally a lot less work to pick arbitrary limits. But I hadn’t thought about it in such concrete terms, and I agree that the concreteness is useful.

    Thanks for the explanation.

    Makeshifts last the longest.