Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Is Lisp/Clojure worth it for rapid web development?
12 points by BadassFractal on April 25, 2012 | hide | past | favorite | 6 comments
I have just joined the rest of you who read Hackers & Painters and wondered if I couldn't be more awesome at my job. The mythos of the small group of highly competent hackers using arcane technologies that place themselves years ahead of their competition is a strong selling point, but I need to separate fantasy from reality. I'm as much of a PG fanboy as anybody else, but I can't take his claims at face value.

As most hackers, I'm excited by the prospect of pushing my skills further and being as "hardcore" as I can. I don't want to end up as just another IT programmer, I want to be orders of magnitude more effective than the average coder. Because of all of the benefits listed in the book, including the ones mentioned by Eric Raymond, the idea of using a rather complex and unpopular language such as Lisp/Clojure is thus alluring. I, however, don't have any experience with either of them, and I need a seasoned opinion.

I'd love to know what those of you who learned Clojure (or perhaps another Lisp variant that is practical in 2012?) think about getting to learn the language. Was is worth it? Assuming there are tons of other things I could spend my time learning, is Clojure a good bang for my buck, if I'm primarily interested in rapid development of web-based projects in a startup environment?

Given that I have already considerable investment in the Ruby/Rails world, and that the sheer number and quality of available gems is a very strong selling point for that ecosystem, is a Lisp, once again, worth it?

Thanks for taking the time to read this!




I spent about an hour looking at noir (the clojure web framework) and here are some terribly shallow and scattered thoughts on the matter.

I learned scheme some 12 years ago and have always liked it, but somehow have never felt comfortable with either clisp, elisp, or even arc (sorry PG). Clojure, on the other hand, makes me pretty happy the way scheme did. It is a joy to use, except for the jre startup time.

To put things into context, the reason I learned scheme was to be able to learn computer science without any particular language getting in the way (yes, it was a SICP course). Scheme was as close to 'no language' as it gets. It is infinitely flexible in its simplicity. Imagine, in a language where the only native data structure is a linked list, adding object-orientation without metaprogramming trickery. It's madness! Well, it's unthinkable if you look at it from an algol-derived language background at least.

So where was I. Right, noir was pretty good. For the rubyists out there, it's very much like sinatra plus haml. As a side note, when explaining lisp, I like to use html as an example of how XML is essentially a bad lisp. Seeing lisp actually being used to generate html gives me the heeby-jeebies, though, and I don't know why. I'm sure it's fine though.

Enough of the niceties, here's where crankypants grandpa programmer comes out. You preface your question with the notion that you want to learn lisp to become better at your craft, which is great. However, when it finally comes out, your question reads, "is it worth switching away from the commercial viability of my current environment?" The answer is, of course, no, as Lisp is so rarely used in the wild that it doesn't make commercial sense. My problem is that you are conflating the value of a language with the value of learning that language.

At this point, learning lisp will likely make you a better developer. But to be honest, learning any other language, or even just another framework will make you a better developer. Think of it like vision. If you look at software development through the lens of RoR, you have only one perspective. Learning python gives you a slightly different second perspective, and thus you perceive depth. The farther away the viewpoint, the better your understanding of its depth. The viewpoint from lisp just happens to be very far away.

The key word here is learning. Even if you don't use it because of limited commercial adoption, the act of learning lisp improves your skill and understanding of your craft. If you have pride in your work, then that is always worth it.


I use arc and Racket for rapid web development. I use them because I like coding in lisp. Having said that, it's only fast if you've got experience with it, otherwise it is a long slog.

Basically, the ecosystem just isn't as good. There is no Heroku for lisp. Want a library to help out with API access? You must write it yourself. Want to make a get request from arc? You must write it yourself. Etc.


> There is no Heroku for lisp.

Heroku itself supports Clojure.

https://devcenter.heroku.com/articles/cedar#polyglot_platfor...


If the ecosystem was as good as that of Ruby, would you claim that lisp is significantly faster to develop in?


Yes (for some value of significant). There are lots of lisps out there - I know that Scheme / Racket / Arc have some nice features that make them good for rapid prototyping, such as continuations, macros, and powerful REPL. Having said that the ecosystem is incredibly important, I think history has shown that a good ecosystem for a weak language is more successful that a strong language with a weak ecosystem.

It's hard to explain exactly, but having macros means that you don't need design patterns and frameworks as much (among other things). You just sort of code, and make macros as the need arises to solve whatever problem you encounter.

Having continuations means you can focus on the flow of the application, and don't have to set up controller / URLs for things, you just code the function directly, and it makes it really easy to implement whatever flow you want (e.g. ask for a login only after a user posts a comment).

The REPL means that you don't need to restart the server to see any changes, you add in whatever changes you have and you can see the results right away, which makes for a really interactive development environment.

When you add it all up, it makes for a pleasant environment to work in.


IMHO, no. You wont really be that much faster than your high-level language of choice.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: