3
3
Clojure is a fantastic language for tackling *hard* problems. Its
4
4
_simple_ tools let us software developers build up layer upon layer of
5
5
abstractions until we've tackled some of the world's most difficult
6
- problems with ease. Like chemistry every great Clojure program boils
6
+ problems with ease. Like chemistry, every great Clojure program boils
7
7
down to simple atoms-- these are our primitives.
8
8
9
- Standing on the shoulder of the Java giants from days of yore, Clojure
9
+ Standing on the shoulders of the Java giants from days of yore, Clojure
10
10
leverages a fantastic array of battle-hardened types present in the
11
11
JVM; strings, numeric types, dates, UUIDs, you name it, Clojure has
12
12
it all. This chapter dives in to the primitives of Clojure and how to
@@ -15,9 +15,9 @@ accomplish common tasks.
15
15
==== Strings
16
16
17
17
Almost every programming language knows how to work with and deal in
18
- strings. Clojure is no exception, and despite a few differences,
18
+ strings. Clojure is no exception and, despite a few differences,
19
19
Clojure provides the same general capabilites as most other
20
- languages.Here are a few key differences we think you should know
20
+ languages. Here are a few key differences we think you should know
21
21
about:
22
22
23
23
First, Clojure strings are backed by Java's UTF-16 strings. You don't
@@ -30,14 +30,14 @@ libraries, Clojure has a rather spartan built-in string
30
30
manipulation library. This may seem odd at first, but Clojure prefers
31
31
simple and composable tools; any of the plethora of collection
32
32
modifying functions in Clojure are all perfectly capable of accepting
33
- strings - they're collections too! For this reason Clojure's string
33
+ strings - they're collections too! For this reason, Clojure's string
34
34
library is unexpectedly small. You'll find that small set of very
35
35
string-specific functions in the +clojure.string+ namespace.
36
36
37
37
Clojure also embraces its host platform (the JVM), and does not
38
38
duplicate functionality already adequalty performed by Java's
39
39
+java.lang.String+ class. Using Java interop in Clojure is not a
40
- failure - the langauge is designed to make it straightforward, and
40
+ failure-- the langauge is designed to make it straightforward, and
41
41
using the built-in string methods is usually just as easy as invoking
42
42
a Clojure function.
43
43
0 commit comments