Another puzzle on logic and obligation

Yesterday, I showed that axiom commonly called ‘ought implies can’ (OIC), if applied to logical reasoning itself, implies that a good part of what are considered logically valid deductions in logic various logics, including the standard formalization of deontic logic itself, would have to be rejected. Today, I’ll discuss a different principle – that obligation implies contingency – and draw another counterintuitive conclusion from it.

If you’re not sold on the axiom, I offer the following argument. For any obligation, the weight of that obligation is only given in experience via the possibility of its absence: in other words, one can only feel obliged to bring about something if it is possible for that thing not to be. Consequently, if there were obligation to bring about what is necessary, it could never be given in experience. While an obligation does not be require its being recognized as such, it at least presupposes the possibility that it be recognized. No such possibility exists in the case of necessities. Therefore, it must be that

(O~□) OA → ¬□A,

which is equivalent to

(O~) OA → ¬A

Given (OIC), this gives us

(OI𝒞) OA → (A ¬A)

We can then define a contingency operator 𝒞 such that

(𝒞) 𝒞A A ¬A

This allows us to rewrite OI𝒞 as follows:

(OI𝒞) OA → 𝒞A

Now, apply this reflexively, as before, to the case of logical reasoning itself. The implication is that for any claim A and agent x, if x is obliged to infer A, x‘s actually inferring must itself be a contingent act.

Now there are two ways to understand this statement, depending on whether we understand reasoning to include in its domain reasoning that can be engaged in, but isn’t, or instead to refer to an act of reasoning actually engaged in. On the less controversial reading, Ought-implies-contingency means that x could simply not engage in a given reasoning process: perhaps our logician has chosen instead to spend the afternoon bingeing on Taylor Swift songs. But on the stronger reading, it means that x, while engaging, could fail to get it. The latter, if correct, would imply something about the kinds of beings to whom logic actually applies, viz. that logic doesn’t apply to ideal reasoners. Consequently, even leaving aside the problem of circular definition, a correct set of inferences or axioms would not be able to be defined by appealing to the kinds of inferences ideal reasoners would make.

Advertisements

A puzzle concerning logic and obligation

The standard axiom for deontic logic, (D), reads as follows:

(D) OA → PA

Where ‘OA’ is read as ‘A is obligatory’, and ‘P’ is read as ‘A is permissible’.

An equally well known principle, albeit more controversial, is that obligation implies possibility.

(OIC) OA → A

The principle the axiom captures is often referred to simply as ‘ought implies can’.

1 The problem

Logic itself, on at least one conception, is a normative discipline: it is about inferences we ought to make.

Applying (OIC) to the subject matter of logic conceived as such, the principle states: any axiom of the correct logical system is one capable of being inferred by the reasoners to whom the obligation to reason so applies.

A problem with this is that as is well known, some axioms of just about any propositional modal logic are infinite in length: for instance, □((p v ¬p) & (q v ¬q) & (r v ¬r)…) i.e. the conjunction of excluded middle for each propositional parameter in the language. If you reject excluded middle, then you can substitute some other example to make the same point (or not!).  The problem, then, is that deontic logic, applied to the domain of logic as such, requires those obligated to reason so to be capable of completing infinitely long chains of reasoning.

Thus, applying a claim of deontic logic reflexively to logical reasoning implies that most theorems of most logics, including those of standard deontic logic, should be rejected.

On economic growth and commodification, 1

There are (at least) two ways in which the growth rate of an economy may be increased.

The first is through an increase in the production of goods or services purchased, as occurred, for instance, when goods like automobiles, phones, computers, etc. first came to market.

The second is through an increase in  accounting of goods that previously existed, but weren’t previously accounted for – that is a movement of goods from non-inclusion in a market to inclusion in it. Letting other things be equal (and because of opportunity costs they usually aren’t), a person who purchases herself a meal rather than cook one, for instance, does not bring about an increase in the production of goods, but only trades in a non-market good, the time and labor used to make her own meal, for a market one, and leads to that good being accounted for. Likewise, if we imagine we line up all the parents of underage children in a given city in a circle, and suppose each parent pays the parent to the right of them the same rate – $20 an hour, say – to watch their children, the real value of services produced would not be greater than they would be in a situation where everyone watched their own children. But since the labor in the latter situation isn’t accounted for in market relations, the former situation would lead to an increase in the nominal value of goods and services relative to the latter. Something similar occurs when a previously illegal good is legalized.

A short remark on specialization in professional philosophy

Public discourse on the nature of philosophy and the future of the philosophy profession currently divides into two camps. One pushes for philosophy to somehow be more public, to move away from specialization by reaching out to the masses. The other holds that the future of philosophy is bound to be more specialized, with different kinds of philosophy available for different subfields, categories of individuals, or even different economic sectors.

Behind the latter view is a pair of assumptions about the nature and understanding of wholes: 1) that wholes are sums of their parts, and 2) that consequentially, distinct knowledge of a whole is built up from, and thus presupposes, distinct knowledge of its parts.

Both of these assumptions are false.

Weekly recap,May 12-18, 2019

This week the blog put up three new posts.

On the consequences of capital concentration and its addendum show how a wide variety of contemporary political problems are directly caused or otherwise conditioned by the concentration of capital according to class and location.

What non-cooperative games can tell us about suffering for a cause discusses a simple, real-world example of a non-cooperative game – a traffic jam – and draws from it the broader claim that even the possibility of obtaining the best, most harmonious outcome for any group considered as a whole requires some of its members to suffer gratuitously, so long as the ideal conditions sought after fail to obtain.

What non-cooperative games can tell us about suffering for a cause

The other day, I found myself stuck on the highway in traffic, which was caused by a lane that was blocked so workers could wash graffiti off of an approaching tunnel wall and trim trees reaching over the highway’s guard rail. The natural reaction of many, if not most drivers in this situation was to place themselves in the shorter and/or faster lane, switching back and forth as necessary up to the point where the traffic jam dissipated.

A traffic jam is a very simple, real-world example of what game-theorists call a non-cooperative game: it is an activity, essentially a very slow race, in which multiple participants have a goal, getting to the end of the jam in the fastest way possible.  It is non-cooperative in that under certain conditions, a participant can better secure that goal for themselves by inhibiting others from achieving it. For instance, if the traffic jam is caused, as they often are, by the imposition of a large blinking light followed by traffic cones blocking off a lane, one can drive as far as one can up to the blocked lane, then merge at the last possible moment, cutting others off and slowing down traffic in the process. In doing so, a driver makes his own position better, but makes the jam worse for everyone else.

People behave in non-cooperative ways for a variety of reasons. Some may have a compelling reason for doing so – emergency ambulance drivers, to continue with our example, can initiate a traffic jam in this way. Others are inattentive, e.g. a distracted driver who slows down and rapidly switches lanes to avoid missing an exit. Others may simply be aggressive or selfish. Others engage in non-cooperative behavior as a preventative and punitive measure against the bad behavior of others, e.g. a driver who refuses to let another merge and thereby contributes to the backup in the merging driver’s lane. Still others, recognizing that their own good behavior won’t be enough to change the underlying situation in light of the uncooperative behavior of others, abandon their natural disposition on the grounds of futility.

Given the assumption that others will behave badly in a given situation, one cannot secure one’s own best outcome by behaving in a cooperative way, e.g. by staying in one lane, driving at a slow, constant pace, and letting others merge when they wish, rather than shifting lanes and closing traffic gaps as quickly as possible. Conversely, the only way to secure the best available outcome for everyone is if everyone (or at least the vast majority) behaves cooperatively, and thus refuses to consider their own advantage under changing conditions.

Let us call the best possible outcome, with respect to a given end, for a community as a whole, just. Understood in this way, not reaction to bad behavior, but indifference to it, serves as a precondition of justice.

Furthermore, for a just outcome in the above sense to even be possible requires that some suffer voluntarily so long as ideal conditions don’t obtain. In doing so, those who suffer under such conditions witness to the possibility of harmony among members of the community, a possibility that they themselves may never see realized.

Lastly, call the harmony of a community, with respect to its natural and chosen ends, consequent on the self-abnegation of its members, its culture.

Voluntary suffering under unjust conditions, then, would serve as a both a witness to and a condition for the very possibility of a common culture.

On the consequences of capital concentration, addendum

frog finances wealth capital coins banknotes monetary toad profit sign background illustration money toy superstition prosperity toad cash dollars one hundred dollars marketing advertising ranidae amphibian bullfrog tree frog organism reptile

In a previous post, I showed how a wide variety of problems, from rural poverty to data mining, are consequent on or otherwise conditioned as responses to the problem of the concentration of capital resources both geographically and by class. Here, I’ll add a few further points that I neglected to mention in the previous post.

As capital concentration increases and capital itself improves, the number of laborers necessary to secure sufficient societal goods decreases. Hence competition among laborers becomes greater. One way this manifests itself is in a tendency for individuals whose production under earlier conditions had been within the context of household business or even outside of sphere of monetary economic activity, to enter (or re-enter) that sphere, particularly women, children, and the elderly. As a result, households, previously themselves diversified units of production, get drawn into the same kind of iterative non-cooperative game that we earlier saw befall businessmen in their competition for the accumulation of capital, and localities, states, and nations in their competition to secure sources both of revenue for their operations and of labor for their citizens. In short, women and, where legal, children, enter the labor force. Initially, this secures a competitive advantage for two-income households. But in the aggregate, this not only increases the supply of labor, leading to a corresponding decrease in its value; it also undermines the rationale of the household as itself a stable unit for production. Inasmuch as marriage was previously understood as a precondition for the well-being and stable operation of households, the need for marriage in this form is undermined, the absolute rate of marriages decreases, and the rationale for marriage itself, if it is to continue playing any important societal role, must shift, as it has in our society to romantic love. Initially, this leads to the possibility of expanding marriage to those who were excluded by the previous definition, e.g. homosexuals, the divorced, groups of individuals, or blood relatives (the exact groups to whom the institution is expanded will differ from society to society, but the underlying rationale is the same). Ultimately, as it becomes clear that marriage is not a prerequisite for romantic love, the institution itself loses its distinction and meaning.

In societies where public discomfort prevents children from working, they do not remain unaffected by effects of capital concentration. Instead, where the education of children was previously informal and conducted by households and local communities (generally as one activity among others), it later becomes the dominant focus of childhood, aimed at a) inculcating attitudes conducive to working conditions that prevent households from serving as economic units and drains societies of the power and opportunity to bring people together and b) providing the basic skills necessary to secure future advantage as skilled laborers in a capitalist economy. Today, these two aims take the form of a) cultivating an understanding of social relations themselves on the model of market relations, i.e. as transactions between consenting individuals free from natural ties, and b) an emphasis on skills in science, technology, engineering, and mechanics (STEM).

Lastly, as individuals are increasingly bereft of not only capital, but of property more broadly, this comes to affect not only the material conditions of life but also the attitudes and psychology of those thus affected. Bereft of the opportunities to meaningfully participate in productive activity that they can call their own, the economic activity of those lacking capital becomes increasingly concentrated on consumption. This brings with it a general slackening of attitudes of self-denial, such as those previously cultivated by religious belief towards the partaking of sex, food, and sleep. Second, it allows opportunities for consumption themselves to become a source of community substituting for kinds of social relations that economic conditions no longer support. This can take the form of associating only with those who have similar consumption habits (e.g. dining at luxury restaurants), or even of the creation of cultural icons and events (e.g. superhero movies, the Super Bowl) as substitutes for religious and other forms of community. As people increasingly identify themselves with what it is they consume, consumer attitudes are increasingly extended to things not previously thought of as consumer goods (e.g. gender, race). Likewise, if forms left over from a fading culture associate consumption with different types of individuals to different degrees (e.g. teenagers more than adults, women more than men, the wealthy more than the poor), those attitudes will be correspondingly more manifest in a society among those classes more associated with consumption, at least until the underlying logic of capital itself extinguishes the material conditions requisite for those attitudes to be sustained.

On the consequences of capital concentration

1 What is capital?

The term ‘capital’ is used in several senses.

In its most basic sense, ‘capital’ refers to physical goods that may be used in the production of other goods or services. In this sense, something as simple as a box of pencils counts as capital.

In another sense, the term may also include non-material goods, such as patents, proprietary code, or the value of a well-known brand.

In a third sense, the term may refer to those types of capital that, in a given era, would provide an advantage over one’s competitors in the provision of certain goods and services – as tractors did for some farmers, at the expense of others, at the turn of the 20th century, and as network effects did for some social media networks, at the expense of others, at the beginning of the 21st. This sense disregards capital which common to all or most participants in a monetary economy (or sector thereof) in order to focus on those granting distinction to their owners.

In a fourth sense, the term is used to refer to goods that, while not themselves capital in any of the above senses, are goods derived in some way from these more basic ones. Common stock, which signify ownership of the right to provide input concerning the direction of capital in these senses, is capital in this sense. A bank loan, which is a tangible signifier of the goodwill that a borrower has in the estimation of a lender, is also capital in this sense.

Capital may be concentrated by location, as, for instance, New York City has a greater quantity and variety of capital than the entire state of Wyoming. It may also be concentrated by class, e.g. if capital ownership is largely restricted to individuals within a given social or economic group.

2 The initial consequences of capital concentration

In all but the most basic sense, the concept of capital is correlative to that of labor power. While nothing prevents labor from itself being regarded as a form of capital, inasmuch as the capacity to work is exercised in the production of goods and services, it is typically regarded as a separate category. The original reason for this was that since labor is a cause of every produced good, and thus a source of capital in the sense of goods used in production, it itself could not be regarded as capital in the same sense that these goods themselves were. The distinction has remained, though the reason that originally grounded it has been abandoned by most mainstream economists.

A society in which capital is sufficiently concentrated in one class of individuals is one in which labor, rather than contributing for the most part to household production of goods for consumption, instead contributes to the sale of goods in a market economy. This occurs in a society where the use of money is directly or indirectly necessitated by law, e.g. via its collection as taxes for the provision of common goods like national defense. The necessity of the provision of taxes in monetary form itself conditionally necessitates formal participation in buying and selling.

However, when capital in the third of the above listed senses becomes available to some members of society, but not others, such individuals have the capacity to produce goods at greater speed than others. Inasmuch as money is itself a means for securing those external goods necessary for maintaining a life, the capacity to produce goods more quickly, and hence to increase sales where there is demand for those goods, may be used as a way of ‘purchasing’ additional leisure time, as a way of providing goods at a lower price than one’s competitors (thus increasing one’s gross profit by cutting into the number of items a competitor sells, while decreasing one’s profit per item sold), or a combination of both. However, since competition for sale of goods and services is not a one-time event, but one iterated indefinitely many times, any choice to not increase production is simultaneously a bet – and a bet against the odds – that competitors sharing the similar capital advantages will act likewise. Because of this, the prudential decision, at least outside of monopoly conditions, will be to use one’s advantage to increase production and thereby lower prices. These conditions provide an instance of a type of scenario call an iterated non-cooperative game, which is one of several kinds of games studied in a discipline called game theory.

As this process is reiterated, previous businessmen will find themselves unable to compete directly with those who have accumulated greater levels of capital, and may find themselves in a situation where rather than selling goods produced, their own competitive advantage lies in selling their labor, i.e. in working for a capitalist. By doing so, they avoid direct competition with their employer, and partake of the advantages that that capitalist has against other competitors, while those employing them are provided with greater labor power against those same competitors. However, since the remaining capitalists will themselves not be in a situation of equilibrium as long as they have competitors, this process will continue to iterate in such a way as to dispossess previous capitalists of their labor for so long as there is not a monopoly and/or the kind of economy in which economic activity operates remains one where access to goods for production plays a decisive factor in determining the place of individuals within that society.

3 Later consequences of capital concentration

For as long as tangible material goods play an important role in a capitalist economy, those goods will have to be located in some place. As those goods become more concentrated in a given class of individuals, they will also become concentrated spatially. As a result of this, those not in a position of capital ownership will compete with each other by offering their labor to the far fewer number in a position to productively employ them. Since opportunities for sale are limited, some will not be hired, and will become poor. In this way, capital concentration generates the problem of urban poverty.

At the same time, as barriers to sales across large distances decrease, certain entire areas will find themselves required and unable, in the absence of deliberate protective measures, to compete with those in possession of greater capital. Since this will be practically impossible, those in possession of sufficiently in-demand skills will leave their areas. The areas they leave will then lack not only the resources, but also the talent to compete with those businesses in the city. In this way, capital concentration generates the problem of rural poverty.

This situation then conditions several further shifts in the economy of the city. In order t secure the advantages of greater production in a situation where buyers of the goods are increasingly scarce, programs are developed to ensure that the poor have at least some purchasing power. In other words, the problem of urban poverty has, as one of its possible, albeit temporary solutions, the creation of the welfare state. This grows government itself as a sector of employment, on the one hand, and –  as these programs come to count the employed among their users – artificially lowers worker wages on the other, since it lowers the price of labor by providing for basic necessities that had earlier been secured by a wage. In this way, welfare provisions then act as an indirect subsidy to employers,  further accelerating the process of capital concentration.

Those workers who find work in the city will find themselves among others who lack work. Some of these will have recourse to participation in the sale of illegal items as a way to provide for their wants and needs. Others will have recourse to theft, sometimes violent. In this way, capital concentration should lead to a relative increase in criminal activity wherever it is located amidst sufficient poverty – which, given the draw of excess labor towards capital will be everywhere capital is located.

As capital becomes sufficiently concentrated in a small number of citizens in a small number of cities, those same citizens come to wield sufficient power that local economies come to depend on them. In this situation, those economies will be less able to extract taxes from them at a rate less advantageous to them than those of neighboring locales. That is, localities, then states will find themselves in the same sort of iterated non-cooperative game with respect to taxation that capitalists themselves were initially in with respect to conditions of leisure. In this way, capitalism, which arises within the context of strong states in great part out through forced participation in the monetary economy in the form of monetary taxation, ultimately inhibits the collection of taxes, and removes the capacity for meaningful self-governance from local political communities .

Correspondingly, those governmental bodies that are capable of exercising taxing power will be those relatively far removed from local communities. As a necessity of counteracting large capital accumulations at sufficient scale, government decisions will begin to be increasingly concentrated at the highest levels, leaving it both unresponsive to the greater mass of its citizens and susceptible to corruption by those parts of society it initially sought to regulate.

Given the absence of sufficient numbers of buyers for the kinds of goods typical of an early market economy, the constant fierce competition for those buyers among existing firms, and the relatively large accumulations of capital by those firms, economies develop to serve not consumers in the traditional sense, but those companies, whose consumption is itself ordered toward the augmentation of their own competitive advantage. These conditions of the lack traditional demand, large capital accumulations, and competition for scarce buyers provide the precondition for the outsized role played in today’s economy by ad revenue and data mining.

The need to ensure a market of buyers for goods that are consumed multiple times requires that buyers not create products that undermine their own demand. Within fields like medicine, the form this will naturally take is a preference for repetitive care on a subscription-like basis over one-time solutions, as instanced in a focus on the development of drugs for repeated use over the cures, and on the very notion of health-care – which emphasizes a concept of care as constant superintendence over the emphasis on recovery from sickness emphasized in the notion of medicine. In other sectors it will take the form of a lower product quality to ensure that users return to buy a given product in a sufficiently short amount of time to make good the money spent in securing one’s competitive advantage. In this way, capital concentration leads to the generation of excessive pollution and landfill.

This list of negative consequences of capital concentration is incomplete. In the following days, I intend to discuss ways not to address these problems, then better methods for doing so.

Author’s picks, May 5-11, 2019

I’ve included three posts I particularly like in this week’s summary:

The first, ‘On semantic ambiguity in Anselm of Canterbury’s argument for God’s existence‘, asks the question ‘just how many readings of St Anselm’s ontological argument for the existence of God are there’. Based on ambiguities in the argument’s minor premise alone, I show that there are at least ten.

The second, ‘On logical fallacies employed in the philosophical use of the term ‘tautology’‘ shows that philosophical invocations of the term play on two ambiguities in the term itself. The first justifies the fallacious inference from a statement’s being true by meaning to its being uninformative. The second justifies the mistaken conclusion that claims of existence and claims of meaning are distinct in kind, and hence not inferrable from each other.

The final post, ‘Object-oriented programming objects aren’t objects‘, argues that a common analogy used to compare the objects of programming languages like C# and Java to real-world objects breaks down rather quickly. Instead, I show that programming objects are actually closer to to the philosophical account of objects found in Leibnizian monads than they are to objects as commonly understood.

Object-oriented programming objects aren’t objects

Object-oriented programming is a computing paradigm implemented in widely used programming languages like Java and C#. It is often described colloquially in terms of the following intuitively plausible ideas:

  • The most basic beings in the universe are particular objects
  • Objects belong to kinds, mathematically represented as classes
  • Objects have states and behavior, which are represented mathematically by fields and methods.

States and behavior can only belong to things, which themselves belong – in a different sense – to kinds. To enforce this, object-oriented programming requires fields and methods for kinds of objects to be attached to an associated class. This is usually achieved by placing the code for the methods and fields an object of a given class may have within brackets {} that give the code for the class as a whole. When this happens, fields and methods are said to be encapsulated in their class.

Since objects belonging to one class can belong to a second class by virtue of belonging to the first, as e.g. whatever is a chihuahua is thereby a dog, objects in one class are able to inherit the behavior of other classes – if there are any behaviors or characteristics that all dogs have in common, chihuahuas will also have them.

The principles specifying the above general ideas in ways appropriate for programming languages are called encapsulation and inheritance, and these are two of the basic principles of every object-oriented programming language.

Datei:CPT-OOP-objects and classes - attmeth.svg

1 Object-oriented programming objects aren’t objects

Once one gets past the analogies, however, one realizes that very little object-oriented programming actually conforms to the pre-theoretical explanation given above. To explain this, it will be useful to take a look at a very simple class from an object-oriented language, Java.

class Bicycle {

    int cadence = 0;
    int speed = 0;
    int gear = 1;

    void changeCadence(int newValue) {
         cadence = newValue;
    }

    void changeGear(int newValue) {
         gear = newValue;
    }

    void speedUp(int increment) {
         speed = speed + increment;   
    }

    void applyBrakes(int decrement) {
         speed = speed - decrement;
    }

    void printStates() {
         System.out.println("cadence:" +
             cadence + " speed:" + 
             speed + " gear:" + gear);
    }
}

The above is an example of a bicycle class taken from the Java Tutorials, a series of tutorials for learning the Java language put out by Oracle, who have held the rights to the language since their acquisition of Sun Microsystems, the language’s creator, in 2010. The class’ fields are cadence, speed, and gear. In this case, the fields do seem to fit into a (non-exhaustive) list of properties that a bicycle can have.

The class’ methods, however, don’t reflect the pre-theoretical intuition at all. Instead of representing behaviors of the object itself, these methods represent ways that the fields of an object can themselves be changed or acted on: the changeCadence() method, for instance, doesn’t reflect an action performed by the bike itself, but one that the bike’s rider could perform to it. Worse, the printStates() method, which prints the bicycle’s cadence, speed, and gear to a terminal, doesn’t reflect anything that someone could do with an actual bicycle. Instead, it represents a task that a program or user can perform on an instance of the bicycle class understood precisely as a digital object in digital space.

Playing Cards Deck

In short, real-world objects have states and behavior. Objects in object-oriented programming (OOP) have analogues to these called fields and methods. The fields of object-oriented objects parallel the states of real-world objects more or less faithfully. But the parallel between the methods of object-oriented objects and the behavior of real-world objects breaks down relatively quickly, for two reasons. The first is that more often than not, the methods of object oriented objects do not represent things the object can do, but things that can be done to the object. Second, objects in object-oriented languages don’t neatly distinguish between methods that act on the object in accordance with the nature of the object it is intended to represent (e.g. as pedal() method might work on a bicycle object), and methods that act on the object precisely as a bundle of code within a computer program. Instead, there is a blending together of larger reality that the object is meant to represent with that which it is, as a piece of code, actually a part of.

2 What are OOP objects?

What, then, are OOP Objects? Better yet, what is it that makes such objects unified in some way, rather than random bundles of code? And accordingly, what is it that makes some OOP objects better conform to the ideal of an OOP object than others?

To answer this question, let’s look at one more example:

public class Card {
    private final int rank;
    private final int suit;

    // Kinds of suits
    public final static int DIAMONDS = 1;
    public final static int CLUBS    = 2;
    public final static int HEARTS   = 3;
    public final static int SPADES   = 4;

    // Kinds of ranks
    public final static int ACE   = 1;
    public final static int DEUCE = 2;
    public final static int THREE = 3;
    public final static int FOUR  = 4;
    public final static int FIVE  = 5;
    public final static int SIX   = 6;
    public final static int SEVEN = 7;
    public final static int EIGHT = 8;
    public final static int NINE  = 9;
    public final static int TEN   = 10;
    public final static int JACK  = 11;
    public final static int QUEEN = 12;
    public final static int KING  = 13;

    public Card(int rank, int suit) {
        assert isValidRank(rank);
        assert isValidSuit(suit);
        this.rank = rank;
        this.suit = suit;
    }

    public int getSuit() {
        return suit;
    }

    public int getRank() {
        return rank;
    }

    public static boolean isValidRank(int rank) {
        return ACE <= rank && rank <= KING;
    }

    public static boolean isValidSuit(int suit) {
        return DIAMONDS <= suit && suit <= SPADES;
    }

    public static String rankToString(int rank) {
        switch (rank) {
        case ACE:
            return "Ace";
        case DEUCE:
            return "Deuce";
        case THREE:
            return "Three";
        case FOUR:
            return "Four";
        case FIVE:
            return "Five";
        case SIX:
            return "Six";
        case SEVEN:
            return "Seven";
        case EIGHT:
            return "Eight";
        case NINE:
            return "Nine";
        case TEN:
            return "Ten";
        case JACK:
            return "Jack";
        case QUEEN:
            return "Queen";
        case KING:
            return "King";
        default:
            //Handle an illegal argument.  There are generally two
            //ways to handle invalid arguments, throwing an exception
            //(see the section on Handling Exceptions) or return null
            return null;
        }    
    }
    
    public static String suitToString(int suit) {
        switch (suit) {
        case DIAMONDS:
            return "Diamonds";
        case CLUBS:
            return "Clubs";
        case HEARTS:
            return "Hearts";
        case SPADES:
            return "Spades";
        default:
            return null;
        }    
    }

    public static void main(String[] args) {
    	
    	// must run program with -ea flag (java -ea ..) to
    	// use assert statements
        assert rankToString(ACE) == "Ace";
        assert rankToString(DEUCE) == "Deuce";
        assert rankToString(THREE) == "Three";
        assert rankToString(FOUR) == "Four";
        assert rankToString(FIVE) == "Five";
        assert rankToString(SIX) == "Six";
        assert rankToString(SEVEN) == "Seven";
        assert rankToString(EIGHT) == "Eight";
        assert rankToString(NINE) == "Nine";
        assert rankToString(TEN) == "Ten";
        assert rankToString(JACK) == "Jack";
        assert rankToString(QUEEN) == "Queen";
        assert rankToString(KING) == "King";

        assert suitToString(DIAMONDS) == "Diamonds";
        assert suitToString(CLUBS) == "Clubs";
        assert suitToString(HEARTS) == "Hearts";
        assert suitToString(SPADES) == "Spades";

    }
}

The above provides an example of a Card class, again taken from Oracle’s Java tutorials. Let’s walk through it.

After the name of the class and an initial curly brace, two fields are declared: rank and suit. After this follow all the kinds of suits, then the kinds of ranks. This is followed by a special kind of method, called a constructor, which may be used by other objects to generate an instance of the Card class, then a pair of methods getSuit() and getRank(), which respectively provide, or return, the value of the suit and rank of a card object to whatever object makes use of, or calls, these methods. This pair of functions belongs to a larger class of methods called getters, whose naming and functionality follow a longstanding coding convention. This is followed by two Boolean methods isValidRank() and isValidSuit(), the methods suitToString() and rankToString(), and the main() method. The Boolean methods, named after the logician George Boole, are so-called because the values they return are ‘true’ and ‘false’, which are represented by the numbers 1 and 0 in the two-valued Boolean number system all computers use. The ToString() methods convert an integer data type to a corresponding string of letters. For instance, when provided the number 2, the rankToString() method returns the string ‘Two’. Common best practice for real-world Java applications places the main method in its own, separate Main class, so we’ll leave that method aside for now.

In short, the Card class above consists of two fields, representing common properties of a card object, a makeshift identification of the card ranks and suits with integers that makes them easier to functionally manipulate, and a set of methods that perform various operations on the card’s fields. Related classes are bundled together into a package, which are to Classes what a file folder is to files.

3 Objects as monads

Thus, object-oriented programming classes are integrated into a larger whole, and have methods that act reflexively on their states, where these methods may treat the things they act on either in accordance with the nature of what they represent or in accordance with their nature as objects in an program. Because of the first condition, classes themselves serve as abstract parts in an abstract whole. When a program using these classes is run, objects which are instances of these classes are created and their methods are used in accordance with user input and the instructions in the code itself.  Because of this, objects can, in turn, exist in other objects.

Philosophy has a name for an object which may exist in another object, has behavior which is reflexive upon its own state, and responds to the behavior of other objects through its own spontaneous behavior, such that all these beings exist as part of a harmoniously working whole: a monad. The term goes back to Gottfried Leibniz, who introduced the concept to provide a unified solution  to the problems involved in explaining both interactions between different bodies and the relation of the body to the soul. On Leibniz’s account, objects don’t genuinely change each other’s states. Instead, God so closely harmonized these various objects in their nature at the beginning of creation that a change in one object would automatically result in a corresponding, albeit spontaneous, change in others. Object-oriented objects act on their own states, exist as parts in a harmonious whole and are all ordered by one dominant method called the main method, just as Leibniz’s monads act reflexively on themselves in a harmonious world ordered perfectly by God from creation.

4 Conclusion

Though object-oriented programming objects are often presented as being strictly analogous to real-world objects, this analogy breaks down fairly quickly. While OOP fields are similar to the static properties of real-world objects, the dynamic behavior of OOP objects is fundamentally different from that of real-world objects: OOP methods don’t explicitly distinguish instances of classes as representations from those same objects as instances of code, and the methods bundled together in a class are bundled with that class (rather than another) because of the manner in which they reflect on, utilize, or otherwise manipulate the object’s more basic states. OOP classes are parts in a whole package, and the methods listed for a given class will depend on the role it plays in that whole (or a similar one). When a program is run, the exact order in which various objects act is given by a master method called the main method, usually set off in its own class. In these ways, objects which instantiate classes in packages are closer to the philosophical account of objects found in Leibniz’s account of monads as parts of a harmonious world which act reflexively on their own states in a manner God coordinates, than they are to objects as commonly understood.