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

Common Lisp for Schemers

Name: fag 2013-12-29 0:49

What's the best way for a Schemer to learn Common Lisp? It seems like Scheme itself is a more beautiful language, but the efforts made by many implementations to make Scheme useful "in the real world" lead to a big ball of mud™. Does Common Lisp avoid this problem? Should I keep trying to learn different Scheme implementations instead until I find something I like?

Name: Anonymous 2013-12-29 12:47

Macros aren't just functions, they're functions that act on terms of code and that's exactly why they can create a referentially opaque context for your term. You want an example? Here you have it:

(defmacro referentially-opaque-context (&body body)
  `(let ((it -1))
     ,@body))

(defun foo ()
  (let ((it 1))
    (referentially-opaque-context
      (+ it 1))))

Thanks to referential opaqueness, we have 1+1=0. If we had renamed the variable into something other than "it", we would have our 1+1=2 back. The semantics of the code term "(+ it 1)" changes depending on the choice of reference. Now go bother someone else with your ignorance.

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