Wednesday, April 24, 2013

Why Isn't Everything in Unobtainabol an Object?

You may have noticed that in a previous post I allow for sorts that are not classes. And of course this implies that there are values that are not objects. So you may be wondering why everything isn't an object like it is in a lot of the newer sexier programming languages. Well, making everything an object may be good enough for  mere mortal programming languages, but it just isn't good enough for the Ultimate Programming Language.

Object-oriented programming has a lot to recommend it, especially for large complex projects with multiple programmers, but it's not perfect and Unobtainabol is perfect.

Other programming languages have gone for purity in other directions. There are languages where everything is a list or everything is a set or everything is a relation or everything is a map or everything is an array. Well, lists, sets, relations, maps, arrays, and objects are all very powerful and general data abstractions. All of those things are very powerful, and technically capable of representing everything all of the others. But each one of those abstractions has it own strengths and weaknesses and when you commit to a pure solution, you get the corresponding strengths but also the corresponding weaknesses. By contrast, if you allow for a multitude of abstractions, you get all of the strengths and the weaknesses tend to cancel out.

Now you could argue that it is possible to actually implement all of those other things using objects. And that's true (just as it's possible to implement objects using those other things). You have two choices when you do this. Either you hide the object-oriented implementation from the user, in which case you have just added those things to the language, or you left the object-oriented implementation showing, in which case you haven't gotten away from the weaknesses of the object-oriented paradigm.

Unobtainabol fully embraces all paradigms that have proven widely useful in programming languages and mathematical notation. It doesn't try to restrict the programmer to some tiny subset of problem-solving techniques on the grounds that those techniques are formally adequate. Merely "adequate" isn't good enough for Unobtainabol.

No comments:

Post a Comment