Wednesday, November 14, 2007

Programming Language Consciousness


If Nelson Mandela is South Africa's Martin Luther King Jr., then Steve Biko is its Malcolm X*. Steve Biko, under the pen name Frank Talk, developed the philosophy of Black Consciousness. This is the idea that Black people in South Africa need to work together with each other to liberate themselves from Apartheid. Liberation would not come as a gift from White liberals, but necessarily came exclusively from the efforts of the oppressed themselves. Before integration is necessary—before it is even helpful— Blacks need to be proud of their own culture and conscious of their oppression.

Some language communities (Tcl, for example) have a shared belief that, it's best to write many things in C, and then bind that library to the higher-level language. C has some advantages: it can be very fast, and it can integrate well with external libraries, which are usually also written in C or C++. So, when users of these languages need something like a GUI library, or a complex data structure, or a function which could sensibly be included as a primitive, or just something that they feel should run a little faster, they go and implement that thing in C. But one of the sources of inspiration for these languages was always to have something better to program in than C. Once the programming language exists, not as much repetitive, low-level coding has to be done in that language.

If we programmers are going to be liberated from this oppressive world of C and other imperative, low-level languages with little sense of abstraction, we have to take charge. A new language could be written in C, but then, once the core is there, libraries should be written in that language. This is the only way that liberation can be achieved.** It's fine to write a binding for existing C libraries, but for new libraries Steve Biko, Alan Turing and I are here to tell you that you do have the power to write them in that language itself! Don't fall into the incrementalist trap of using the new language for glue and C for the "heavy-duty" stuff, as this will only prolong and damage the struggle. Code written in the new, better language will be easier to maintain and extend. Paraphrasing Biko speaking about not relying on one's oppressor: Programmer, you are on your own.




* That is, if MLK had founded a guerilla organization and later became president, and if Malcolm X were viciously murdered by the government. I'm referring to the old Malcolm X, of course, not after started being more polite in rhetoric to White people. As it turned out, Mandela's movement (the African National Congress) was a huge amount more successful than the movement that Biko inspired (the Black Consciousness Movement, and later the Azanian People's Organization). Also, in the early '90s, the ANC was basically at war with the Inkhata Freedom Party, another liberation movement, in what's today KwaZulu-Natal***, and they also had significant conflicts with Azapo during the run-up to the elections. But who's counting? It's called an analogy, people. By the way, for those of you who are aware that there are more than just Africans and Europeans in South Africa, Biko extended the definition of Black to include everyone who's oppressed and acknowledges it, basically. (This way, Indians and Colored people could join the movement.)

** OK, in reality, as the above footnote notes, the multiracialist ANC beat out Azapo, but it's the idea that matters...

*** KwaZulu-Natal is my favorite province ever. Who would have thought of a CamelCase name? (Well, must've been those missionaries who created the current writing system for isiZulu.)

If my relatively intense (for me), intro-level History of Southern Africa course is good for anything, it's good for drawing spurious historical analogies for slightly tongue-in-cheek essays, right? This started out being an essay explaining why I'm a little uncomfortable with Io, because of their philosophy of implementing everything in C, but I ended up not mentioning it, except in this footnote. Sadly, this will be my most-read essay on South Africa.

Update: My wonderful history professor, Jamie Monson, read this post and told me that I was a little wrong about the historical fact about the ANC fighting with Azapo, because the mostly fought with the Inkatha Freedom Party. How could I have made such an error? It's fixed now.

5 comments:

Anonymous said...

Thank you for the courage to speak it.

Berlin Brown Discussions said...

Cool reference. As one of the few black hackers that frequent your blog, I am impressed.

And I agree with the premise of your article. And would also like to add, it would be nice if the core aspect of the language (for example with Factor) were written in Factor code but also third-party libraries; xml libraries written in Factor, database drivers, gui libraries.

In the java world, there is the concept "100% pure Java library" like Lucene, like Nutch. I hope we will hear about "100% pure Factor libraries"

Allen Short said...

Except there's thousands of man-years of development in other languages (I don't think that C necessarily has to be singled out here: the Python app my company is developing depends on a Java library, Lucene). Rewrite-the-world projects pretty much always fail. Are you rewriting a library in your new language because the old one sucks too much to use? Great. Are you rewriting it because you're afraid that writing an interface to it would be collaborating with the establishment? Maybe you've got problems that aren't technical in nature.

abhik said...

Weirdest first-paragraph to second-paragraph transition. ever. but i learned something new and interesting and that's never bad.

Unknown said...

In response to berlin and washort, I tend to side with those who want to repurpose external libraries. External libraries tend to be more dependable, and probably have more specialized developers behind them. Nevertheless, Factor's XML and GUI libraries are written in Factor.

In response to abhik, I was thinking of putting in a transition, or maybe [insert transition here], but I think abruptness worked out OK. I love ignoring the rules of good writing (such as, say, to proofread).