Trevor Burnham

Sure, it works in practice…

Programming Language Renaissance

March 22nd, 2010

This is the sixth in a series of posts about Paul Graham’s book Hackers & Painters.

I knew that Paul Graham felt strongly about dynamic typing. It is, after all, a critical feature of Lisp, a language Graham is so enamored with that he wrote his own dialect of it. Still, I was sur­prised to see him use the heading “Seat Belts or Hand­cuffs?” for a section weighing dynamic vs. static typing in the book’s tenth chapter, “Pro­gram­ming Lan­guages Explained.” He grudg­ingly admits that “some smart people seem to like static typing, so the question must still be an open one.” (In the next chapter, he elab­o­rates on his reasons: “…static typing seems to preclude true macros—without which, in my opinion, no language is worth using.”)

Graham’s passion for dynamic typing pales in com­par­i­son to this aston­ish­ing claim about open source software: “I’m cer­tainly not against the idea of property, and yet I would be very reluc­tant to install software I didn’t have the source for.” Why? Because if he has the source, he can fix any bugs he encoun­ters. And, more impor­tantly, so can everyone else. “Lots of smart people have examined the source code of open source oper­at­ing systems like Linux and FreeBSD and have already found most of the bugs. Whereas Windows is only as reliable as big-​​company QA can make it.” That’s a bold state­ment, and I’m told that PG is no hyp­ocrite: He runs nothing but Firefox and vi on his machine. But he’s also a fan of closed-​​source webapps. The dis­tinc­tion being, I suppose, that bugs in a webapp can only affect your system if there’s a bug in your web browser as well. System crashes are unpleas­ant, but using them as the foun­da­tion for such a broad prin­ci­ple is rather eccen­tric. It’s a bit like becoming vegan to avoid salmonella.

Graham once again runs into the audience problem: Is this book for hackers, or for the merely curious about hacking? The chapter is squarely aimed at the latter, explain­ing terms like “high-​​level language.” It seems to have been written pri­mar­ily to bring the mass-​​market reader up to speed for the next chapter, “The Hundred Year Language.”

Having estab­lished that we are now living in a Renais­sance of pro­gram­ming lan­guages, he wonders what will happen over the next century. Some of his con­clu­sions are uncon­tro­ver­sial: Main­stream lan­guages will be more high-​​level than they are today, with more layers of abstrac­tion between them and the machine. Proces­sors will, after all, be many times more powerful than they are today, even if Moore’s law is indeed petering out. “Inef­fi­cient software isn’t gross. What’s gross is a language that makes pro­gram­mers do needless work.”

He lambasts object-​​oriented pro­gram­ming, but predicts that it will stick around as an unfor­tu­nate legacy of the 20th century: “Though I don’t think it has much to offer good pro­gram­mers, except in certain spe­cial­ized domains, it is irre­sistible to large orga­ni­za­tions.” This is a sur­pris­ing stance. To most pro­gram­mers, I would say, there is some­thing intu­itively very appeal­ing about the clean sep­a­ra­tion of concerns that well-​​encapsulated objects provide so naturally.

But the most aston­ish­ing claim of the chapter is that “par­al­lelism will be some­thing that is avail­able if you ask for it explic­itly, but not ordi­nar­ily used. This implies that the kind of par­al­lelism we have in a hundred years will not, except in special appli­ca­tions, be massive par­al­lelism. I expect for ordinary pro­gram­mers it will be more like being able to fork off processes that all end up running in parallel.” Really? There is, today, a resur­gence in interest in func­tional lan­guages because the number of cores in com­put­ers is increas­ing much more quickly than the power of indi­vid­ual cores is. In the year 2010, a popular word proces­sor run on a single core seems rather pokey. Everyone is trying to build their appli­ca­tions for multiple cores. Future com­pil­ers will almost cer­tainly be smart enough to provide us with par­al­lelism auto­mat­i­cally. Cores may be a million times faster, but text editors will have a billion times as much bloat.

Tags:     No Comments

0 responses so far ↓

Comments are closed.