Hacker News new | past | comments | ask | show | jobs | submit login

Why Lisp? Wouldn't any functional language do the same? I'm not flaming here, just wondering... I learned SML which was OK, but it didn't change my world. I still like writing code in Ruby better.



In short, no. ESR had it right. "That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot."

My primary bread-and-butter language is Javascript. When done "right", Javascript is a very expressive functional/prototypal object oriented language with a lot of very interesting features. If you can do it in lisp, you can do it in Javascript: http://foohack.com/tests/ycomb.html

I've seen in myself and in coworkers, the best Javascripters know at least a little lisp, and as their lisp skills increase, so do their javascript skills. I suspect it would have the same effect on Ruby or SML or Erlang programmers.

Their attitude towards boilerplate code tends to change as well, and they begin seek solutions that are as concise and expressive as possible.

Lisp is unique because it effectively has no syntax. You write the abstract syntax tree directly. By removing the scaffolding, Lisp exposes the programmer to the fundamental nature of any programming language in a way that no other programming language does.

That's why C and Lisp are the best languages to learn, as early as possible: if you know these two pretty well, you're in a good position to master any language you might come across.

Misc is a promising cousin of Lisp: http://will.thimbleby.net/misc/ I've played with it a little, but not enough to really have a strong opinion of it.


There are some great books for Scheme in particular. Many of them are geared toward the art of programming itself, rather than how to do X in Y days, which frees up the curriculum for exploring things like recursive forms that a student in a hurry would almost certainly just hack around, without learning the fundamental idea.

Also, learning Scheme as a first language almost guarantees you'll have to learn a second language. ;)


I learned SML which was OK, but it didn't change my world.

This seems odd to me. Working with Haskell for a while changed how I think about state. I usually avoid (non-trivially) mutable objects now, and instead return a modified copy of an object. (For an example, see the process method here: http://git.jrock.us/?p=Template-Refine.git;a=blob;f=lib/Temp... )

Also, Haskell's type classes (and CL's CLOS) are a different approach to OO compared to Smalltalk-style "send a message to the object". It is definitely good to be able to think about OO both ways.


Just curious, have you used OCaml much? I'm really curious how it compares to SML.


Lisp isn't just a functional language. Yes, you can write functional code in Lisp, but you can use other techniques when functional is awkward.




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

Search: