In practice, penal codes and the judges and magistrates who implement them in the courts seek to balance the various reasons for imposing punish¬ment, all of which are accepted as proper goals for the penal system to pursue. From time to time, however one or other of the ideas becomes dominant, and penal codes are written or altered to prioritize one penal goal at the expense of others. Since the institution of modern penal sys¬tems, there have been successive 'fashions' in penal theory: at various stages in the development of penal codes in modern industrial societies, the alternative justifications for punishment have enjoyed differing degrees of relative influence. The earliest penal codes of modern Western societies pri¬oritized deterrence of potential offenders above the other aims; reform and rehabilitation of actual offenders have been fashionable aims during the nineteenth century and for most of the twentieth; in the last quarter of this century, there has been a widespread disillusion with the rehabilitative aim and a return to public protection and to punishment according to desert. All the penal goals are represented in the actual codes and practices of Western societies, but the balance between them changes.