When you think about it, the trinity is rather difficult to explain. And indeed, we will never be able to fully describe an eternal all powerful being. That being said, I think we can come up with something better than “it’s like water.”

For example, the problem many have noted with the water example is that H20 cannot exist as both liquid gas and solid at the same time, yet God exists as Son, Father, and Spirit at the same time, all the time.

God is a Developer

I think we can agree God as a creator is an expert builder and masterful artist. As such, I think it’s fair to say he is also a senior programmer. He is the software architect, one might say. As such, I think humanity’s relatively recent discovery and implementation of Computer Science concepts through software engineering is no accident. God is inviting us to a wonderful deeper insight into how He thinks and how he built the universe.

He certainly built our existence using code, and used several languages. A basic layer of logic which guides our universe could be said to be the atomic or subatomic layers, perhaps akin to Assembly. All the laws of mathematics and physics obey certain laws, which are written somehow into the fabric of our existence. And then things get really interesting with living things: we have DNA, a high level language in comparison.

Programming Crash Course

If you're not a developer, let me explain a few things. When programming, at some point all the code and logic we write must get compiled to 1s and 0s so the computer can understand and execute the instructions. Assembly, is the most basic language which just has words representing combinations of 1s and 0s. Every other language, even one which lets you do many things with a simple line, must ultimately get "compiled" and converted to this Assembly language so it can be run by the computer.

In essence, the high level language must still follow the laws of the lower language one. Similarly, our cells, while they have their own behavior dictated by DNA, must still adhere and follow the laws of physics to exist in this reality.

Why this Matters

So what am I saying? I am saying that by studying programming, we can gain new insights into our existence and God's character just as one might achieve by studying other arts and sciences such as writing and mathematics. Whether or not you are a writer or a software engineer, it is worthwhile to study writing or computer science to better understand yourself, your world, and your creator.

The Code

So with that, let’s look at the Trinity as explained using Object Oriented programming principles expressed in the Swift language. Object oriented programming is the idea that we can describe and define the idea of a thing, as separate from the actual thing itself. A class is like a blueprint, a way to describe the behavior and description of a thing without being the thing itself. An object, sometimes called an "instance" is when a specific instance of the class is put into the program.

For those who study philosophy, it’s actually quite similar to Plato's theory of forms. Objects and matter in the world, are just like "objects" in code. The idea or "form" or true essence behind the specific instance are like "classes" in code.

What is so fascinating, is when a programmer writes a Class they are now participating in the creation of the essence of a thing in a way Plato could only have dreamed of. This is incredible, and unprecedented in the history of humanity's creative endeavors. As one who has done all of the following, I would argue this programming analogy is more complete than that of mathematics, physics, writing, sculpting, or filmmaking.

Trinity in Code

To describe the trinity using code, we must discuss two more programming concepts, sub classing and class extensions. An example of a class might be an "Animal" it describes a certain kind of living organism. A subclass might be a "Mammal", it inherits all attributes of the animal, but also has some specific or unique characteristics. Some classes are never expressed as an instance, they are a concept only. For example, there is no such thing as a "mammal" in the world. Instead, a subclass of a Mammal, a "Dog" might have an instance which you call fido. Furthermore a "final" class cannot be subclassed again keeping that class separate.

Let's review and apply to the concept of the trinity:

  1. Classes are not instances, they describe the essence of the thing, as such they are eternal
  2. God, the base class, is never used directly, but expressed through one of it's 3 equal and distinct subclasses
  3. Those classes are never subclassed again, and therefore marked final, keeping God's holiness.
  4. In programming, classes always start with a capital letter, instances with a lowercased letter.
    class God
    final class Son: God
    final class Father: God
    final class Spirit: God
    // The Son Class in detail
    final class Son: God {
      enum Name {
        case Immanuel
        case WonderfulCounselor
        case MightyGod
        case EverlastingFather
        case PrinceOfPeace
        case Christ
        case Lord
        case Master
        case Logos
        case SonOfMan
        case SonOfGod
        case SonOfDavid
        case LambOfGod
        case LightOfTheWorld
      //around 2000 years ago
      let godSaves: Son = Son.instantiateSelfIntoTimeWithAttribute(humanity)
      if englishSpeaker {
        godSaves.name = "Jesus"
      } else if hebrewSpeaker {
        godSaves.name = "Yeshua"

Let’s walk through it

God is the super class, but all 3 forms of the trinity inherit from it. This shows they are equal, yet they express unique distinct characteristics of God. This also shows God can be all 3 forms of himself at all times: Just because a subclass such as Father or Spirit exist God never ceases being God. Likewise, the Son is not lacking any of God’s attributes as the Son inherits all the same attributes the Father and Spirit inherit.

Furthermore these are classes, not objects, which is appropriate as they are eternal.

Names of God

I use enums to help describe the many names of the Son. Each one shows different attributes of him and is merely a title to make explanation of his character simpler, just how an enum helps make code more readable.

It’s important to note these describe the Class Son and not the instance godSaves. These names describe his eternal nature. The instance godSaves was never a father for example, but the Class Son is because he inherits all attributes of the Class God (which are also passed to the class Father).

I imagine a lot of confusion and apparent contradictions in the Bible can be better understood when we realize God was not talking about instances of certain things but rather the eternal Class the instance is formed after.

Yeshua: the God-Man

The first object or instance of the eternal class God is expressed as the subclass Son and named godSaves. This name is appropriate as it is the meaning of his name and best describes this object. The name "Jesus" on the other hand, is simply the localized english version of his name.

When we refer to him primarily through localized names like Jesus it can be unhelpful to those new to the faith and lead some to believe this Jewish man was a European man when he was not. First and foremost is his relation to all humans, which is that God saves, rather than any particular race. We would do well to remember this when talking to others about God Saves and not perpetuate silly myths about the power of the english name "Jesus" and miss the true power found within the meaning of that name.

Wrap up

So, we can see the man born 2000 years ago does not lose any of his eternal divinity but is rather an instance of that divinity with humanity added. In a handful of lines, software code eloquently describes our creator in a way that volumes of books struggle to do the same.

What do you think?

For those in ministry, I hope you can see and agree that programming serves as a powerful tool to better understand our creator and explain theological concepts. I think theologians should make a point to study computer science. Have I convinced you?

For the programmers reading this, another way to express the trinity could be to use class extensions rather than subclassing. Particularly if you built out the model further where God was the base class for all things (not a final class) and all classes inherited from him. This would help explain passages in the bible which say we have God living inside us such as Psalm 82:6 and John 10:34 and perhaps provide further insight to Colossians 1:16. This approach would be similar to NSObject in apple programming frameworks. Which do you think is the better analogy?