You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cljlab/syntax.clj
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -70,8 +70,8 @@ clojure.core/+ ; Namespaced symbol
70
70
;;; In Clojure, source code is read as characters by the Reader. The Reader may read the source either from .clj files or be given a series of expressions interactively. The Reader produces Clojure data. The Clojure compiler then produces the bytecode for the JVM.
71
71
;;;
72
72
;;; There are two important points here:
73
-
;;; 1. The unit of source code is a Clojure expression, not a Clojure source file. Source files are read as a series of expressions or individual expressions may be sent interactively.
74
-
;;; 2. Separating the Reader and the Compiler is a key feature that allows for macros. Macros take code as data, and emit code as data. Can you see where a loop for macro expansion could be inserted in the evaluation model?
73
+
;;; 1. The unit of source code is a *Clojure expression*, not a Clojure source file. Source files are read as a series of expressions, just as if you typed those expressions interactively at the REPL.
74
+
;;; 2. Separating the Reader and the Compiler is a key separation that makes room for macros. Macros are special functions that take code (as data), and emit code (as data). Can you see where a loop for macro expansion could be inserted in the evaluation model?
75
75
;; **
76
76
77
77
;; **
@@ -114,7 +114,7 @@ clojure.core/+ ; Namespaced symbol
114
114
;; **
115
115
116
116
;; **
117
-
;;; Sometimes it's useful to avoid the evaluation rules, in particular for symbols and lists. Sometimes a symbol should just be a symbol:
117
+
;;; Sometimes it's useful to avoid the evaluation rules, in particular for symbols and lists. Sometimes a symbol should just be a symbol without looking up what it refers to:
118
118
;; **
119
119
120
120
;; @@
@@ -125,7 +125,7 @@ clojure.core/+ ; Namespaced symbol
125
125
;; <=
126
126
127
127
;; **
128
-
;;; And sometimes a list should just be a list of data (not code):
128
+
;;; And sometimes a list should just be a list of data values (not code to evaluate):
129
129
;; **
130
130
131
131
;; @@
@@ -159,7 +159,7 @@ clojure.core/+ ; Namespaced symbol
159
159
;; <=
160
160
161
161
;; **
162
-
;;; For now, don't worry too much about quote but it shows up on this page once or twice to delay evaluation of symbols or lists.
162
+
;;; For now, don't worry too much about quote but you will see it occasionally in these materials to avoid evaluation of symbols or lists.
163
163
;; **
164
164
165
165
;; **
@@ -172,7 +172,7 @@ clojure.core/+ ; Namespaced symbol
172
172
;;; 3. Print the result by converting it from data back to characters.
173
173
;;; 4. Loop back to the beginning.
174
174
;;;
175
-
;;; One important aspect of #2 is that Clojure always compiles the expression before executing it; Clojure is never interpreted, always compiled first.
175
+
;;; One important aspect of #2 is that Clojure always compiles the expression before executing it; Clojure is **always** compiled to JVM bytecode. There is no Clojure interpreter.
0 commit comments