Zero one infinity rule

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Software development
Core activities
Paradigms and models
Methodologies and frameworks
Supporting disciplines
Standards and Bodies of Knowledge

The Zero one or infinity (ZOI) rule is a rule of thumb in software design proposed[when?] by early computing pioneer Willem van der Poel.[1] It argues that arbitrary limits on the number of instances of a particular entity[jargon] should not be allowed. Specifically, an entity should either be forbidden entirely, only one should be allowed, or any number of them should be allowed.[2] Although various factors outside that particular software could limit this number in practice, it should not be the software itself that puts a hard limit on the number of instances of the entity.

"Allow none of foo, one of foo, or any number of foo."

Examples of this rule may be found in the structure of many file systems' directories (also known as folders):

  • 0 – The topmost directory has zero parent directories; that is, there is no directory that contains the topmost directory.
  • 1 – Each subdirectory has exactly one parent directory (not including shortcuts to the directory's location; while such files may have similar icons to the icons of the destination directories, they are not directories at all).
  • ∞ (infinity) – Each directory, whether the topmost directory or any of its subdirectories, according to the file system's rules, may contain any number of files or subdirectories. Practical limits to this number are caused by other factors, such as space available on storage media and how well the computer's operating system is maintained.[citation needed]

Note that violations of this rule of thumb do exist: for example, some file systems impose a limit of 65,536 (i.e. 216) files to a directory.[3]


  1. ^
  2. ^ "Zero-One-Infinity Rule". Jargon File.
  3. ^ "NTFS vs. FAT vs exFAT". Retrieved 2015-03-09.