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

Fad Oriented Programming

Name: Anonymous 2015-03-04 4:05

Is it time to declare object orientation officially over and allow functional programming to take the crown as the latest fad?

Also, do you think logical programming will be next? Maybe I should brush up on my Prolog.

Name: Anonymous 2015-03-09 9:38

>>53
Dude, I don't know what you've been smoking. It's really strange that a simple fact such as this (all Lisp code is made up of lists and atoms) needs so much explanations, but here goes.

#(1 2 3) is obviously an atom. Just like 8, just like "anus".

(vector 1 2 3) is also obviously a list. Just like (1 2 3) is a list, just like (1 #'sort 666 #(a b c)) is a list.

The REPL session that you posted is absolutely in accordance with this. (form-is-list-p #(1 2 3)) gives a NIL because #(1 2 3) is an atom, not a list. You can check that explicitly by using the atom predicate:

* (atom '8)
T
* (atom '(1 2 3))
NIL
* (atom '#(1 2 3))
T


A more interesting test would be this:

(defmacro vec-macro #(a b)
`(format t "I got a vector of ~a and a ~a" ,a ,b))
(defun vec-syntax-test ()
(vec-macro '#(1 2))


But that fails miserably at compile-time:

debugger invoked on a SIMPLE-TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {1002C6F2D3}>:
DEFMACRO lambda-list is not a list #(A B)


So Silver Bank Common Lisp is a red-blooded, full-on Lisp. Not so for Clojure.

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