We propose an evolutionary perspective to classify and characterize the diverse systems of adaptive immunity that have been discovered across all major domains of life. We put forward a new function-based classification according to the way information is acquired by the immune systems: Darwinian immunity (currently known from, but not necessarily limited to, vertebrates) relies on the Darwinian process of clonal selection to 'learn' by cumulative trial-and-error feedback; Lamarckian immunity uses templated targeting (guided adaptation) to internalize heritable information on potential threats; finally, shotgun immunity operates through somatic mechanisms of variable targeting without feedback. We argue that the origin of Darwinian (but not...