This isn’t a post about kernels or compilers, but believe me I can barely fathom the humblingly impressive work that went into the GCC or Linux kernel. I am talking about languages. Allow me to explain.
A very good measure of a ‘language speaker’ is an agent able to tell lies and jokes. In order to lie or tell jokes, one must understand the architecture of a language (not just its syntax, but its semantics as well) enough to fundamentally alter its meaning. But language is only communication of ideas, so by changing the meaning of the language, you are applying your world-view and literally crafting new meaning into the world.
Sarcasm and irony, two of the most complex vehicles for humor, are impossible without first understanding the contexutal linguistic basis of the situation, and then extending that knowledge to recognize its subtle absurdities. To first take a sentence’s literal definition and twist its meaning to fit a different, often diametrically opposed, application requires a deep, meta-comprehension of a language.
So how does this relate to C?
Have you ever tried to lie or tell jokes in C? I admit to having a very passing knowledge of its constructs, but it seems to me that you cannot. Yes you can name variables ‘foo’ or ‘not_a_pointer’ when it really is, but that’s not what I mean. You cannot significantly alter the structure or meaning of the language itself.
Consider macros in Clojure or meta-programming with method_missing and define_method in Ruby. Forget shooting yourself in the foot, you can blow your leg clean off! C is an amazingly efficient means of communicating with a computer – it is fast, maps well to the constructs of assembly, and maintains a respectably logical simplicity. But as a linguaphile (both in computers and humans) I think it lacks a certain richness, a humanity that I find very appealing and attractive in the meaning that languages can convey. The expressiveness found in higher language may have given us the vapid wasteland of Call Me Maybe, but it also gave us the fun, enlightening works Vonnegut.
Comments on: "You Can’t Do Anything Interesting in C" (6)
I think the bit that you missed is that …C was meant to program computers with, and that’s why it’s not as good at being a vehicle for irony or whatever it is you seem to expect.
Ruby was also built to program computers, and its expressiveness is orders of magnitude about that of C. I’m comparing natural languages (English, Spanish, etc.), whose semantic structure we alter frequently in the form of jokes (sarcasm, irony, etc.) or lies, with programming languages. Higher level languages (in programming) are called such because of their greater expressiveness.
Literally none of this is coherent or meaningful. Your arguments about language are incorrect and border on meaningless. Your argument for the richness of programming languages as means of communicating jokes (????) can only be expressed with a WTF were you thinking?
That was a metaphor for altering the semantic structure of a language, I obviously didn’t mean that I wanted to tell jokes via a programming language.
Some languages deserve to tout their abilty to express, other languages deserve to tout their simplicity and lack of overhead.
Of course “simplicity” is an unintentionally misleading word here. What might be “more simple” for the programmer in one language is more overhead for the compiler, interpreter, or resources needed to run it. C is diametrically opposed to languages with too much overhead, its advantage is being closer to the hardware. No one would/should expect it to be so expressive, because that’s not why it was written and not why C programmers use it.
I prefer more expressive languages, too, because they’re a greater pleasure to work with. But underneath what I consider the most expressive and flexible language of all time is an interpreter written in C, and it all will be boiled down to machine language anyway. And I’m thankful for that!
I dare say if you can “lie” or use sarcasm in machine language, you can port those lies or jokes to C. If you can’t do that with machine language, go write an abstraction– you can always do that. Choice of language isn’t either/or, these layers compliment each other very well.
I kind of understand what you are saying. I think it is something along the lines of that Ruby is more expressive than C?
I think many would disagree with you on that, C will allow you to do everything in Ruby. You just need to write it yourself. Not as convenient but it does not mean C is any less expressive.
Some would argue abstraction ruins creativity, not sure I agree with that however.