Aktuelle Änderungen Printable View Änderungen Bearbeiten
TypeInference > BeautifulCode > ReadEvalPrint > JamieZawinski > PythonSprache > GuisInClojure > Continuations > SpaghettiCode > DanielWeinreb > TuringMachine > PythonHacking > BertrandMeyer > DynamicTyping > ClojureMacros > BarbaraLiskov > DestroyJavaVM > ClojureIdiomsClear Trailclojure.contrib.repl-utils.show to reflect on Java-APIUnlike CL, symbols are just names, with no associated values. The things that are more like symbols from that perspective in Clojure are vars, and it is vars that are interned in namespaces. Two symbols with the same name can be distinct objects. A namespace is not a set of symbols but a set of mappings from symbols to references - either vars or classes.
This separation of concerns is an important part of how Clojure is a Lisp-1 while still supporting defmacro semi-hygienically. The reader reads plain symbols and does no interning. The compiler resolves names (symbols) in the compilation namespace in order to find vars/classes. def interns new vars, and import/refer/use can make new mappings.
; Only run the application if this is being run as a script,
; not if loaded in a REPL with load-file.
; When run as a script, the path to this file
; will be a command-line argument.
(if *command-line-args* (main))
also see PythonIdioms#main
Note: This does not work if the standalone-script does not get any parameters passed.
Chouser: ,(some #{'c} '(a b c))
clojurebot: c
gko: why , in front of your samples?
ataggart: it tells clojurebot to execute it