This is a read-only archive!

I'm turning into a Lisp snob

Reddit and StackOverflow and other websites I frequent are filled to the brim with discussion of Google's Go. The code snippet on the front page is:

package main

import "fmt"

func main() {
  fmt.Printf("Hello, 世界\n")
}

First thoughts that ran through my head as I looked over the site:

  • Ugh, look at all that syntax.
  • Nice(r) type system (than C++ and Java). I'll stick with multimethods though.
  • Concurrency semantics, hmmm... Shared mutable memory between threads? I think I'll stick with Clojure for now thanks.
  • Where are the macros?
  • It has anonymous functions and closures and sort-of first-class functions? Good. Welcome to the 1960's.
  • len is a special operator? Sigh. (Programming language quality is usually inversely proportional to the number of special forms.)
  • Cool that they used Japanese in the example though. (That word is sekai, "world", obviously.)

Compared to a Lisp, this language looks indistinguishable to C, Perl, Python, Java etc. It looks like such a small incremental improvement (if it even is an improvement). Yet another imperative, for-loop-wielding, curly-brace-using, pointer-mangling, state-mutating, OOP language.

In fact via Reddit today I read this awesome post to a mailing list which compares Go with ALGOL68, and it gave me a would-you-look-at-that moment. Once you learn a few languages that are significantly different from ALGOL derivatives, all ALGOLish languages start to look eerily similar. Are we really stuck with ALGOL-derived languages being the only viable mainstream languages for all time? How much polish can we possibly apply to the same turd?

Then I realized, I'm turning into a Lisp snob. : ( Learning a Lisp apparently does spoil you for the rest of time. I am without a basis to judge whether this language will be a successful replacement of anything. All I know is I probably won't use it. Honestly I'm much more excited about new things on the horizon in Clojure. And I still have getting better at Haskell on my TODO list.

November 13, 2009 @ 2:38 PM PST
Cateogory: Programming
Tags: Lisp, Go, Clojure

12 Comments

polyglot
Quoth polyglot on November 14, 2009 @ 1:17 AM PST

Cool that they used Japanese in the example though. (That word is sekai, "world", obviously.)

Well, it could also be Cantonese ("sai3gaai3"), Korean ("세계"/"segye") or Mandarin ("shìjiè") ;)

Joe O'Donnell
Quoth Joe O'Donnell on November 14, 2009 @ 1:40 AM PST

Great post. It all begs the question of why google doesn't just use lisp? C has been the mind crack of programming, once a coder starts with it, they never give it up.

ps-I saw Jesus on my curtains.

Dan Ballard
Quoth Dan Ballard on November 14, 2009 @ 1:46 AM PST

I don't know if you read it, but you made Hacker News Or see the comment page

Chris
Quoth Chris on November 14, 2009 @ 2:21 AM PST

I think the reason is that lisp isn't used is typing. There is the perception that a systems language would need to have static typing and there isn't (please correct me if I'm wrong) a stand-out statically-typed lisp.

Alex
Quoth Alex on November 14, 2009 @ 4:49 AM PST

Haskell has static typing and is even more concise than lisp. It doesn't have macros, but there are several language extensions (template haskell) that provide that sort of functionality. One of then will no doubt be included in the next version of haskell coming out next year.

Brian
Quoth Brian on November 14, 2009 @ 5:14 AM PST

@polyglot: Touché.

@Joe: Awesome. Say hi for me.

@Dan: Finally made me register over there, way to go.

@Chris: There's always Qi.

@Alex: Yeah Haskell is a great language too. I'd hesitate to say it's more concise than Lisp. Fewer characters per line maybe (thanks to all the punctuation operators and point-free stuff). But Haskell still has a lot of boilerplate; Lisp can be made essentially boilerplate-free. Admittedly I haven't tried Haskell macros / templates.

T
Quoth T on November 14, 2009 @ 5:19 AM PST

You bring up some nice points. I really liked the mailing list post.

"Great post. It all begs the question of why google doesn't just use lisp? C has been the mind crack of programming, once a coder starts with it, they never give it up."

Google probably doesn't use Lisp for a number of reasons. Foremost, there exists no really good implementation of Lisp. Common Lisp is a mess with its Lisp 2.0 stuff (they treat functions and variables differently), Clojure runs on the JVM, which results in some weird syntax in places and it's a ball and chain no one really wants to deal with. The Scheme world is unbelievably fragmented. In addition, whilst Lisp is a "multi-paradigm" language, it is most beautiful and most powerful when used functionally. Currently, most of, if not all Google's software engineers are primarily versed in imperative and OO programming. Retraining them to code functionally would be tedious and expensive.

"I think the reason is that lisp isn't used is typing. There is the perception that a systems language would need to have static typing and there isn't (please correct me if I'm wrong) a stand-out statically-typed lisp."

Types are not the issue. Lisp can be made to have a strong static type system (see ftp://ftp.cs.utexas.edu/pub/boyer/diss/akers.pdf).

I tire of the fad that is Haskell. It is definitely an interesting SML/Miranda derivative with some nice properties (lazy evaluation can be good... sometimes), but it is not the end-all-be-all of functional programming. Most Haskell programmers I have met don't actually have the slightest clue about the "advantages" of a purely functional language, nor are they capable of explaining what a monad is (which is central to the language's purity). They're fanboys riding the propaganda bandwagon and it's just plain annoying. Further, not to make this a language war, but suggesting Haskell in place of a Lisp is comparing apples to oranges. In Lisp, code is data and data is code. This concept is completely absent in languages like Haskell, Clean, SML, etc.

Salvador Fuentes
Quoth Salvador Fuentes on November 14, 2009 @ 6:02 AM PST

It seems you (as well as several other people) can only imagine a future with Haskell or Lisp syntax as if anything else is inferior. I find that to be foolish and immature.

Go was specifically designed to be a systems language, period. Lisp was never designed as so, and perhaps that is why its hardly used as a systems language today. Personally, I like Lisp, Haskell, and Python but I also know C is a great systems language even though its not perfect and its a bit passed its prime. Thus Go seems to be a good progression from the C/C++ family (I never really saw Java being a systems language but that's my opinion).

Anyway, I agree I think you're becoming a bit of a lisp snob. It might suit you to be a bit more open minded and objective. Even if you don't fully understand the design of Go, you should be able to understand that it was designed by people who have credible experience and skill in designing languages and systems. And sorry to spoil things for you, but the last thing I can imagine is Clojure being the next systems language.

Your post essentially is a brief comparison of a selection of fruits without much substance.

Lastly, here's a piece of advice:

"That's why I reserve the right to match the language to the problem, and even - often - to coordinate software written in several languages towards solving a single problem."

Roland
Quoth Roland on November 14, 2009 @ 6:59 AM PST

Personally I think LISP is the ugliest functional programming language, and I've used ML, Haskell, LISP and Erlang.

blah
Quoth blah on November 14, 2009 @ 10:58 PM PST

"Go was specifically designed to be a systems language, period. Lisp was never designed as so,"

Wat? Sorry, Lisp was absolutely a systems language for two decades or so, occupying a position for Lisp Machine hardware similar to C for C Machine hardware ("Unix boxes").

Clueless google fanboy.

S. Datskovskiy
Quoth S. Datskovskiy on November 30, 2009 @ 1:45 AM PST

Joe O'Donnell wrote:

It all begs the question of why google doesn't just use lisp?

No one has brought up the most straightforward explanation. Google is much like any other Java/Web 2.0 cube farm: armies of wage slaves engaged in pyramid-building drudgery, though with above-average pay, plush armchairs, and free lunches.

Here is what one notable Google escapee had to say after doing his time:

"The interchangeable component model of software engineers seemed to work reasonably well there. It's just not a business model in which I wish to be involved, at least not on the component-provider side. So after a year at Google I quit and returned to JPL."

Erann Gat: "Lisping at JPL"

Andrew Pennebaker
Quoth Andrew Pennebaker on July 12, 2011 @ 8:54 AM PDT

It's not snobbish to identify ALGOL descendants, nor is it snobbish to point out, as McCarthy did, that "Ruby still isn't up to where Lisp was in 1960".

John McCarthy on Elephant 2000 http://www.infoq.com/interviews/mccarthy-elephant-2000