Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

programming with functions

Name: Anonymous 2010-06-23 2:11

is functional programming at least most of what it's cracked up to be? nothing is everything it's cracked up to be, so is FP at least most of what it claims to be?

i know whats-his-face says you should learn LISP because it turns on god-mode for programming and LISP has a bunch of functional...paradigms, i guess, but functional programming seems like a lot of super-academic handjobbing and hobnobbery.

Name: 4,6 2010-06-23 11:30

>>9
You can implement type inference if you need it. Some CL compilers do it, as CL does support type declarations (either to obtain speed or to improve type-checking).

You could also implement your own statically-typed Lisp(see Qi  for an example), or take a statically typed language like Haskell or O'Caml and write an S-Expression based syntax.

However, even if all these things are possible, most Lispers aren't that keen on static type systems (or other things based on restricting how a language works. My personal opinion here is that I find writing Lisp more effortless than I find writing ML, but the experience is a bit too different to describe). They'll usually take the fun parts, like pattern matching languages and just keep their dynamicly typed language.

>>7
Here's some starting resources for you:

Scheme:

SICP - General programming book/bible, but it also shows Scheme.
Little Schemer - Introductory Scheme book
HtDP - SICP-like, simplified.
RnRS - The standards. Read them. ( Read at least R5RS. )
LISP in small pieces - Intermediate-Advanced. Mostly Scheme-oriented compiler/interpreter building book. Very interesting and entertaining read, show semantics of various Lisps. Even if it's written in Scheme, a lot of CL-related semantics are discussed too.

Common Lisp:

http://www.gigamonkeys.com/book/ PCL - great introductory-advanced book, compehensive, practical, up to date.

http://norvig.com/paip.html PAIP - Teaches both AI and CL, great book.

http://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html CLtL2 - pre-ANSI CL reference, more readable than the Hyperspec, but there are some differences from that and the standardized version

http://www.paulgraham.com/acl.html ANSI CL - introductory-intermediate, decent, but PG will only show off the parts of the language he likes and in the way he likes it, which means you'll miss some rather cool features. If you choose to start with this, be sure to check out PCL as well.

http://www.paulgraham.com/onlisp.html - On Lisp. Beginner-Advanced - focuses on macro writing, closure networks, parsing, pattern matching and other interesting topics.

Keene's Object-Oriented Programming in Common Lisp - Beginner-Intermediate - Pretty good CLOS introduction. Easy to read, also a good book about OO design in general.

The Art of the Metaobject Protocol - Intermediary/Advanced. Great book if you want to truly understand CLOS(and its MOP) and how to extend/"redefine" it.

http://lisp-book.org/ - Lisp Outside the Box - Incomplete book about the practical matters of using current CL implementations and libraries. You should also check out its SLIME chapter as it's a really useful Emacs interaction mode.

http://www.lispworks.com/documentation/HyperSpec/Front/ - The Hyperspec. HTML version of the standard, the REFERENCE. Set up your Emacs to look up function definitions here. It's very useful when learning, and not only. It's not meant to be read in full, unless you're already familiar with CL, and possibly plan on implementing the language. If you're serious about CL, you'll probably end up reading most of it anyway when you look things up. Newbies might find it terse.

Oh, and here's a reasonable, but a bit outdated introduction by someone else: http://p-cos.net/lisp/guide.html

There's probably other good books that I forgot to mention, but you should probably read at least SICP from those books, and then get a feel for Scheme and CL, and learn one or both of them. I'm mostly a CLer, but I'm fluent in Scheme as well, even if I don't write much code in it. Knowing more than one Lisp dialect isn't hard, but you'll probably end up liking to write code in one more than the other (some like Lisp-1, others like Lisp-2. Some like small languages in which they can experiment on things like language semantics, others like bigger languages with well-defined behaviour geared towards more large-scale development).

Oh, and if you plan on learning, be sure to get a good implementation and a good editor that comes with it. For CL, that would be Emacs+SLIME+Paredit+Redshank and SBCL, ClozureCL, CLISP, LispWorks, Allegro ... as an implementation. For Scheme, I've mostly used PLT (now named Racket) and MIT Scheme.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List