Skip to content

Commit 40c20fa

Browse files
authored
Add Java and Clojure parts (#68)
* add Java and Clojure parts
1 parent fac9602 commit 40c20fa

16 files changed

Lines changed: 264 additions & 1 deletion

book/SUMMARY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,24 @@
197197

198198
* [Conclusion](languages/lua/conclusion.md)
199199

200+
* [JVM](languages/JVM/README.md)
201+
202+
* [Introduction](languages/jvm/intro.md)
203+
204+
* [Java](languages/jvm/java/README.md)
205+
206+
* [Introduction](languages/jvm/java/intro.md)
207+
208+
* [History](languages/jvm/java/history.md)
209+
210+
* [Advantages](languages/jvm/java/advantages.md)
211+
212+
* [Disadvantages](languages/jvm/java/disadvantages.md)
213+
214+
* [Some interesting facts](languages/jvm/java/misc.md)
215+
216+
* [Conclusion](languages/jvm/java/conclusion.md)
217+
200218
## End
201219

202220
* [Credits](credits.md)

book/languages/clojure/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Hi
2+
3+
> This chapter was made by Skayo.
4+
5+
Welcome to the Clojure part!
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Advantages of Clojure
2+
3+
## What makes Clojure cool
4+
5+
* all the benefits of functional programming
6+
7+
* alllws dynamic, compact code with macros, multimethods and late binding
8+
9+
* Java interoperability
10+
11+
* portability and fast garbage collection
12+
13+
* functional data structures, software transactional memory, all the concurrency goodies
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Conclusion
2+
3+
Well, it's nice to know Clojure.
4+
Around 200 companies use Clojure, including Adobe, Amazon, Apple, Cisco and many more.
5+
And the incomes are not that bad.
6+
7+
## Sources
8+
9+
* [**Wikipedia**](https://en.wikipedia.org/wiki/Clojure)
10+
11+
* [**Official Clojure Page**](https://clojure.org/)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Disadvantages of Clojure
2+
3+
## What makes Clojure uncool
4+
5+
* Not a memory efficient language
6+
7+
* Lacks a reliable static typing layer
8+
9+
* It can't be used for highly perfomant low level code
10+
11+
* It warms up slowly

book/languages/clojure/history.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# History
2+
3+
## The begginings
4+
5+
**Rick Hickey** is the creator of Clojure. Before Clojure he developed a similar language, **dotLisp**, but it was based on the .NET platform and three earlier attempts to provide interoperability between JVM and Lisp (**jfli, FOIL and Lisplets**).
6+
7+
He spent *around* 2.5 years working on the language before realeasing it to the public and much of that time without outside funding. At the end of that time, Hickey sent an email to some of his friends in Lisp community announcing the Clojure language.

book/languages/clojure/intro.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Inception
2+
3+
**Clojure** is dynamic, modern and functional dialect of Lisp on the Java platform.
4+
Clojure has a Lisp macro system. Just like the other Lisps, code is treated as data.
5+
6+
Clojure supports immutable data structures and immutability. It does encourage programmers to be explicit about managing identity and its states.
7+
It's intended to facilitate developing more robust, especially concurrent programs that are fast and simple.
8+
9+
Commercial support for Clojure is provided by Cognitect.
10+
11+
Clojure was developed because the creator wanted kinda modern Lisp for functional programming, designed for concurrency and symbiotic with the Java platform.
12+
13+
> File extensions for Clojure code are .clj .cljs .cljc and .edn

book/languages/clojure/misc.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Interesting facts about Clojure
2+
3+
## Clojure code compared to other languages
4+
5+
> Example of Hello World app in some languages
6+
7+
### Clojure
8+
9+
```clojure
10+
(ns clojure.examples.hello
11+
(:gen-class))
12+
(defn hello-world []
13+
(println "Hello World"))
14+
(hello-world)
15+
```
16+
17+
### Java
18+
19+
```java
20+
class HelloWorld {
21+
public static void main(String[] args) {
22+
System.out.println("Hello, World!");
23+
}
24+
}
25+
```
26+
27+
### Ruby
28+
29+
```Ruby
30+
puts "Hello world!"
31+
```

book/languages/haskell/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ This language was created, by the whole team, that included:
4545

4646
**Haskell** specification is published and open for everyone. **Glasgow Haskell Compiler (GHC)** is its main implementation, which is both, native-code compiler and interpreter, that runs on most of the platforms.
4747

48-
> File extensions for Haskell code are .hs and .lhs
48+
> File extensions for Haskell code are .hs and .lhs

book/languages/java/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Hi
2+
3+
> This chapter was made by Skayo.
4+
5+
Welcome to the Java part!

0 commit comments

Comments
 (0)