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

What is Lisp good for?

Name: Anonymous 2007-07-26 4:56 ID:oSdzs5zo

When I hear Bash/Perl/Ruby/Java/C/ML/Erlang/Smalltalk/etc I know what I'm dealing with, I know what they are good for and when to use them, but what about List? Don't get me wrong, I like Lisp, I just don't see for what I could use it.

So, what are you doing with Lisp and why exactly Lisp over any other PL?

Name: lispexamples !!74aqDvBw0pj8UoD 2007-07-26 10:09 ID:AYkKzNh1

Lisp dialects are general purpose and multi-paradigm.

Lisp is good for writing mini-languages for specific problem domains:

The LOOP macro:
(loop for x across "hi" collect x) => (#\h #\i)

qsort
(defun qsort (list)
  (when list
    (loop with (x . xs) = list
       for y in xs
       when (< y x) collect y into lt
       else collect y into gte
       finally (return (append (qsort lt) (list x) (qsort gte))))))


cl-who
> (with-html-output-to-string (s)
    (:div :style (conc "padding:"
                       (format nil "~A" (+ 3 2)))
     "foobar"
     (:p "hi")))
"<div style='padding:5'>foobar<p>hi</p></div>"


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