The Gospel according to an Object-oriented Programmer

December 6, 2008

I was answering some questions about virtual destructors in C++, and it led me to think about Object-Oriented programing concepts in terms of Christianity.  I think it’s more instructive and interesting to go the other way, to explain Christianity in terms of OOP.  Let me explain.

First let us establish the transcendence of God.  If the world that we live in can be compared to a program, and we are but lines of code that are being compiled and executed, then God, is nothing like us.  God is the programmer who exist in a totally different realm of reality, just as a programmer is in a different realm of reality compared to the code that he writes.

This realization brings to light the magnitude of significance of the Incarnation of Christ.  How can a programmer write himself into his own program?   The Christian doctrine states that Christ is the exact representation of God’s being.  How can a program represent exactly the programmer?  We can begin to imagine how we could go about this – wee may start with a class, have various member variables for his name, age, hair color, and even things like a list of friends, his personality, and so on.  By doing so, the instance of this class, can be said to be exactly like the programmer in that program.  Since other instances of other classes cannot exactly come in contact with the programmer, they can only know the programmer through the instance of this programmer class.  Likewise, since God is transcendent, we can only come to know him, by coming to know His incarnation in our realm – namely, Christ.

Let us move on.  If God thinks like an object-oriented programmer, than He is less concerned about what we do, and more about what we are.  In other words, he is concerned far more about type-safety than writing some fancy functions.  If this is the case, then we should naturally ask ourselves: what are we?  What is our type?  We could answer that we are but an instance of type such and such.  We all have our various labels.  Programmer. Student. Teacher. Pastor. But the most important type, the base class that we must have as Christians, are Sons. (I do not mean to exclude the sisters, here. I’m using the word Sons in the same sense that it’s used in the epistles, in what it implies as regards to our inheritance.)  “Our Father who art in heaven,” is how we are to start our prayers.  And Sons take after their Fathers.  We must not be overly concerned of what we do; that will come naturally if we remember who we are.

We need not stop here.  In OOP there are some design patterns that frequently appear in our programs.  One such pattern is a Factory, which produces instances of various classes.  We can then ask ourselves, “How did we become Sons?  How did we end up as Sons? What is that Factory?”  I’m sure the previous two paragraphs provides an answer to this question.  If the Programmer is our Father, than the Incarnation must be the Factory.  We become Sons through the reinterpret_cast of Jesus Christ.  What was a totally different type, becomes a new class, a new creation!

This is the biggest flaw of Weslyian theology.  It is too concerned about what we do than who we are.  Both are important, but one comes from another.  There is an order, in all things, even if they are equal, just like enums.  Like the Trinity: though they are equal and the same, it’s still Father, Son, and Spirit, and not in another order.  Justification, then sanctification.  Both important, but one must come after the other. The list can go on and on.  Faith and works.  But works cannot come before faith.  God’s will and our will.  Our will cannot come before God’s will.  Christ’s divine nature, and human nature.   Scripture divinely inspired, and written by men.  All nominal types must be orinal in some sense.  They cannot exist in a void, without relations to other things.   When we define enums, we must define the values one by one. (okay this last paragraph is weak…)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: