Arc Forumnew | comments | leaders | submitlogin
Learningcurve of LISP?
2 points by globalrev 6063 days ago | 14 comments
so im playing around with Arc trying to learn by coding simple functions and i constantly run into problems with simple stuff that i write in a whim in other languages(like python).

is the learningcurve really steep in the beginning and then it explodes?

just hard to wrap your head around the parenthesis and awkward notation in the beginning i guess.

also, it seems the language discourages the use of variables which is something i use a lot normally. maybe i suck if LISP is beauty :) ?



5 points by cchooper 6063 days ago | link

Everyone who comes to Lisp has problems with the syntax at first. It's not hard, it just takes time to unlearn all that bad syntax from other languages :)

It also sounds like you're not used to functional programming. That's a much harder hurdle, because it's a completely different way of thinking, a whole new world. You basically have to learn to program all over again.

But it's worth it. Imperative programming is simple to learn, but can only take you so far. In contrast, you can spend your whole life learning functional programming and you'll just keep getting better and better at it. There's a virtual infinity of new abstractions and techniques you can use, and there are whole branches of computer science inventing more: iterators, generators, zippers, monads, arrows, lazy lists... It's endless.

So don't worry if you find Lisp hard. Everyone does. All I can say is that everyone who has persevered at it and mastered it comes to love it and never wants to go back.

-----

3 points by kens 6063 days ago | link

I've interviewed a lot of people who have experience with Lisp, and I ask them if they think learning Lisp is worthwhile. Almost all of them reply with some variant of "Why on earth would you do that?" I've received a couple "Yes, definitely" replies from people who are hard-core Lisp hackers. So empirically it seems that most people who learn Lisp don't find it particularly rewarding.

-----

1 point by absz 6057 days ago | link

I've talked to many fewer people than you, but my impression has been slightly different. Broadly speaking, the engineer-type programmers tend to dislike Lisp, and the computer-science-type programmers tend to like it. (Those two classes cover, in my [albeit limited] experience, two of the principle ways of thinking about programming.)

-----

1 point by almkglor 6057 days ago | link

LOL. Considering that my boss thinks I'm an engineer (and hired me as such), this really hurts!

-----

1 point by absz 6057 days ago | link

Eh. It's attitude, not job description :) And anyway, you should probably take that with a relatively enormous grain of salt, as small sample sizes aren't conducive to accurate data.

-----

4 points by antiismist 6057 days ago | link

For the parenthesis issue, just use a decent editor like vim or emacs and it is a non-issue.

Tangent: I was on the Muni the other day working w/ Scheme on my laptop, and this guy sitting next to me turns out to a CS master's student. We talk a little about lisp, and it turns out he doesn't like it, because he couldn't handle having to balance the )'s.

I was like, "counting? the editor does that for you..."

Turns out he was programming with notepad. I was blown away that someone working on a CS masters would use notepad for lisp (or any other serious programming task).

-----

3 points by jmatt 6063 days ago | link

I ran into problems when I first started writing scheme. I think the learning curve seems steep because it is a different paradigm than python. Lisps are all functional languages. Most commonly used languages in the end are similar, they are imperative languages.

I'd expect it to take some time to get used to and learn this new style of coding. Variables in general are not needed especially outside the scope of a function or macro. Syntax is weird because there isn't much of it to begin with.

I'd recommend that you first read the entire tutorial and make sure you understand what's going on there. Then I'd recommend reading some of Paul Graham's "On Lisp". Even though it is in CL instead of arc - I think the philosophy is the same.

http://ycombinator.com/arc/tut.txt

http://www.paulgraham.com/onlisptext.html

-----

2 points by tokipin 6063 days ago | link

you don't have to write programs in a functional style. write them in whatever way they are most natural. though i agree with/let are kind of ookie at first

in my case what happens in languages is i hit a ceiling. in some languages i hit it right away, in others it takes a week or two. the worst ceiling imo is lack of first-class functions. beside that, code-as-data is another major lisp benefit. just consider lisp a language with ceilings substantially higher than most other languages

most of all i recommend having a significant project to write regardless of what language you're learning

-----

1 point by wfarr 6063 days ago | link

The learning curve is quite small. You're just learning a different thinking process than you're used to.

It might help for you to read "The Roots of Lisp" by Paul Graham, which will not only explain Lisp's core axioms, but also show you how they form other things in the language.

After that, I'd see if you can find a copy of "The Little Schemer" by Daniel P. Friedman and Matthis Felleisen, which will not only introduce you to sound functional concepts through the use of recursion, but do so by helping you write functions which are actually quite useful.

There is of course, much more literature out there that will go far more in-depth into Lisp, but these will provide a gentle introduction to the basics.

-----

1 point by jmatt 6063 days ago | link

The learning curve is small if you have a math or cs education, if you've been exposed to another functional language or you naturally think in s-expressions.

If you are just a random python programmer and you looked at arc I could see it being challenging. The axioms of lambda calculus and functional programming are concise and simple but that doesn't mean the concepts they imply are also simple.

I agree The Little Schemer is a great book. Along with SICP, On Lisp, etc.

In the end it is worth the trouble to learn at least one lisp dialect. It'll improve your coding and make you question why you are writing imperative-language-001 all day long.

-----

4 points by wfarr 6063 days ago | link

Having come from Perl, Python, and Ruby I didn't have much trouble.

Granted, Ruby makes use of closures and anonymous functions more often than the other two.

I think the greatest learning tool I had was configuring my Emacs setup and writing extensions to do things I wanted in my workflow.

-----

1 point by globalrev 6063 days ago | link

i have read somewhere that you should keep the functional part of a program as small as possible because it makes it too hard to follow if its big.

but LISP is basically all functiosn right?

so you think whoever wrote/said that was a m?

-----

4 points by cchooper 6063 days ago | link

I've never heard anyone say that before. It sounds crazy to me.

Are you sure they weren't talking about keeping individual functions small?

-----

1 point by globalrev 6063 days ago | link

could be, not sure and have no link.

-----