@@ -3,35 +3,37 @@ Functional World
3
3
4
4
![ Functional World] ( http://turnoff.us/image/en/functional-world.png )
5
5
6
- - In a not-so distant futrue, after functional programming won the war of paradigms...
7
- - ... immutability is now the law.
8
- - Functional World an immutable novel
9
- - Honey, Cloud you turn on the right.
10
- - Sure, Honey.
11
- - I was thinking about shaving my head.
12
- - Don't do it...
13
- - I'll miss you..
14
- - You won't be able to tell the difference.
15
- - Later on..
16
- - Shave it all off, Joe.
17
- - You'll never be the same.
18
- - Here's your treatment...
19
- - Around the corner...
20
- - Hey,Boss, Wanna get a variable?
21
- - A double variable please...
22
- - Hmmm, I love this Side Effect...
23
- - To be Continue
24
-
25
-
6
+ - 不久之后,函数式编程赢得了编程范式之争...
7
+ - ... 不可变成为了万物的规律。
8
+ - 函数式编程的世界 一个不可变的小说
9
+ - 亲爱的,能麻烦你开一下灯吗?
10
+ - 好的,亲爱的。
11
+ - 嘿,我想去剃个头。
12
+ - 哦不,别这样...
13
+ - 我会想你的..
14
+ - 放心,你不会看出任何区别的。
15
+ - 之后..
16
+ - Joe,把我的头发剃光。
17
+ - 你永远不会是原来的自己了
18
+ - 请享受我的服务...
19
+ - 此时,在一条街的转角...
20
+ - 嘿,老板,想来份变量吗?
21
+ - 请给我一个双精度浮点(double)变量,谢谢...
22
+ - 啊,我爱死这副作用了...
23
+ - 未完待续
24
+
25
+ 作者巧妙地指出了函数式编程不可变(immultable)的特点。当你需要改变一个对象的属性的时候……嗯,销毁了再创建一个就是了。
26
+ 这里的老板想来份变量(改变全局变量的值),而所谓"副作用"(side effect),指的是在这种编程范式下,函数内部与外部互动可能会产生运算以外的其他结果,或导致程序出现不可预料的行为。
27
+ 或许,事件驱动的编程范式会好一点……?
26
28
27
29
via:
28
30
- http://turnoff.us/geek/functional-world/
29
31
30
32
作者:[ Daniel Stori] [ a ]
31
- 译者:[ 译者ID ] ( https://github.com/译者ID )
33
+ 译者:[ ItsLucas ] ( https://github.com/ItsLucas )
32
34
校对:[ 校对者ID] ( https://github.com/校对者ID )
33
35
合成:[ 合成者ID] ( https://github.com/合成者ID )
34
- 点评:[ 点评ID ] ( https://github.com/点评者ID )
36
+ 点评:[ ItsLucas ] ( https://github.com/ItsLucas )
35
37
36
38
本文由 [ LCTT] ( https://github.com/LCTT/TranslateProject ) 原创编译,[ Linux中国] ( https://linux.cn/ ) 荣誉推出
37
39
0 commit comments