No, the title of this page wasn't meant to be a dyslexic referrence to ExtremeProgramming, but is rather a way for me to express some of my thoughts on the Art and Science of Computer Programming. - BillZimmerly
Whenever I am dealing with a set of difficult concepts, and am trying to communicate them in a more convenient way, I like to express the EXTREMES of the concept so as to have a great range to work with.
In programming - just as in many other models of reality - I see the following extremes:
Assumming all programming languages can be found within this range, I see that there are similar strengths and weaknessess in these concepts as there are in the world of human governments.
Freedom tends to breed differences, and there are good and bad fruit to be found in these differences.
Likewise, Tyranny tends to breed conformity, and there is good and bad fruit to be found there too.
I think the most extreme example of Freedom in the programming language realm is the ForthLanguage. Forth is flexible to the extreme in that there is nothing sacred about it. (Any portion of Forth is subject to modification as the programmer sees fit. Not even the behavior of the compiler is outside of this ideal.)
I think the most extreme example of Tyranny in the programming language realm is the JavaLanguage. Java is strongly typed and does not support pointers at all.
Of course, with freedom comes responsibility, and beginners are best working in a tightly controlled environment. The possibilities for discussing the relative strengths and weaknesses of these EXTREMES might make for a lively discussion.
Because programming is a human enterprise, freedom or tyranny ultimately comes from the humans doing it. The language should be as free as anyone can stand, and leave it to the humans to impose rules upon it. To have the language impose the rules is to accept that the language designer knows the group better than does the group itself.
This applies, of course, to humans who know that rules are made and broken to serve a purpose. Humans who don't even know there are rules yet, or who think there should be just one set of them, might be better suited to a language that imposes a draconian order.
Programming Freedom? Freedom from what, and secured by what means?
Java offers programmers freedom from certain things. It offers freedom from having to free memory and do pointer arithmetic, but I think it is a mistake to attempt to free programmers from the complexities of programming. You can't free programmers from programming. Fortunately, Java does not try to free programmers from all the complexities.
The real freedoms Java offers are from other people. Java offers programmers the freedom from having other people's code do unpredictable things when they call it. That freedom is secured by certain mechanisms built into the language.
Java's big inconvenience to programmers comes from the freedoms the language offers directly to the users of Java programs. Java gives ordinary users the security of knowing that programs written in Java can't do certain things they're not supposed to, like access unauthorized memory. In order to secure that freedom for users, Java prevents programmers from doing certain things. It isn't tyranny; it's a trade-off. As a programmer, you can write a Java program and put up with the barriers, but then your users know that it's safe to run your program (or library) no matter what you did.
Forth, on the other hand, gives programmers a great deal of power. Programmers have the power to screw themselves up in Forth. They have the power to screw up the system in Forth. When Forth programmers work together, they have the power to screw each other up, to overwrite each other's memory areas, to alter each other's compilers in defiance of expectations, and so forth. Also, when a user runs a Forth program, he is trusting the original programmers with an immense amount of power. WithPowerComesResponsibility?.
But programmers still put mechanisms in place to secure their freedom. They do it when they have to, almost automatically, without even thinking too much about it. Sometimes it is better to secure freedom by a process, for the programming team, than to secure it by mechanisms in the language; e.g., you can require that all programmers writing a Forth routine specify what memory areas they are using, so that the programmers can be free from stomping on each other's memory areas. But usually programmers will agree on that, themselves.
Tyranny and anarchy are impossible to program under. (Anarchy is just a peculiar form of tyranny where anybody who has power and wants to be a tyrant can be one.) Tyranny leaves programmers powerless; they might as well not be there at all. Anarchy leaves them at each other's arbitrary mercy.
Conformity is not obtained by tyranny but by agreement. Freedom is a necessary precondition of such agreement. As such, I submit that it cannot be a bad thing.
And, in general, sometimes the "middle way" is not the best way. Sometimes one of the extremes is the best way. Like good and evil. -- anonymous
I would propose the opposite. In general, the extremes are not the best way, and focusing on the extremes impedes evaluation to determine an appropriate solution to the problem at hand. --WayneMack
"Programming Freedom? Freedom from what, and secured by what means?"
Freedom is never a from what ... it is a freedom to ... and the difference between the two is subtle and important.
To illustrate this, consider the phrases freedom of religion and freedom from religion.
Many people are under the mistaken impression that they are one and the same ... they are not!!!
For example, one who finds offense in seeing someone pray on public property might assert that their freedom from religion is being violated, and insist that the offender cease. The offender, of course, would insist that his freedom of religion is the actual right that is being violated by being forced to stop!
You see, freedom from something is not the same thing as freedom of something. In point of fact, they're opposites!
Bringing this concept back to the programming realm, there are those who desire to limit what programmers can do in order to maintain control over the project, and this is not a bad thing, per say. Some languages (ex. Java) make this considerably easier than others.
What is important to recognize is that when it comes to Blue Skying totally new territories in the programming landscape, it is the languages of freedom (ex. Forth) that permit such a limitless field of experimentation. As many Forth programmers point out, Forth is better looked upon as a meta-language, a language for creating languages that match a problem domain. -- BillZimmerly