/ Religion

The Trinity in Swift

The trinity is one of those hard theological things to explain. Certainly we cannot ever totally describe an eternal all powerful God, however I think we can come up with better explanations than “it’s like water.” For example, the problem 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.

So, because God is a master builder he is also a master programmer, and I think humanity’s relatively recent discovery and implementation of Computer Science and Software Engineering is no accident and actually a wonderful insight into how God thinks and how he built the universe. He certainly built our existence using code, and several languages I might add. A basic layer could be said to be the Atomic layer, perhaps akin to Assembly. (Certainly new discoveries are being made about quantum mechanics that may be even more foundational, but thats outside the scope of this analogy for now) And then things get really interesting with living things: we have DNA, a very high level language in comparison.

The Code

So with that, lets look at the Trinity as explained using Object Oriented design expressed in the Swift language.

// Classes are not instances, they are eternal
// God, the base class, is never used directly, but expressed through one of it's 3 equal and distinct subclasses
// Those classes are never subclassed, and therefore final, keeping God's holiness.
// Another way to express this could be to use class extensions. Particularly if you built out the model further where God was the root object all classes inherited from. This approach would be similiar to NSObject.
class God
final class Son: God
final class Father: God
final class Spirit: God

// some examples of the eternal names of the Son, as part of the trinity
final class Son: God {
  enum Names {
case Immanuel, WonderfulCounselor, MightyGod, EverlastingFather, PrinceOfPeace, Christ, Lord, Master, Logos, SonOfMan, SonOfGod, SonOfDavid, LambOfGod, LightOfTheWorld
  
switch whoIsGod {
 case Son.Immanuel:
  print("God is with us")
  //etc
}
  }

  //around 2000 years ago
  let godSaves: Son = Son.instantiateSelfIntoTimeWithAttribute(humanity)

  //how we as people relate to the man and instance of the Son, whose name means God Saves, but we call him by names familiar to us
  if englishSpeaker {
godSaves.name = Jesus
  } else if hebrewSpeaker {
godSaves.name = Yeshua
  } //etc
}

So 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 sublclass such as Father or Spirit exist God never ceases being God. Likewise, the Son is not lacking of 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.

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. Also, these names make more sense when we realize they apply to the Class Son and not the instance godSaves. The instance godSaves was never a father for example, but the Class Son is by inheriting attributes of the Class God (which are also passed to the class Father) and by creating all living things is a 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.

We see the first object, first instance of God appear as the human whose name means God Saves, so thats what we will call him. When we refer to him primarily through localized names like Jesus it can be misleading and lead others to believe this Jewish man was a European man when he was not. Also, first and foremost is his relation to all humans, rather than any particular race.
So here we can easily see the man born 2000 years ago does not lose any of his eternal divinity but is rather an instance of that divinity which has humanity added to him.

The Trinity in Swift
Share this