l**********n 发帖数: 8443 | 1 people use it in oop more than fp. why scala becomes symbolic of fp? |
p*****2 发帖数: 21240 | 2 fp 的对头是 imperative 不是oop
【在 l**********n 的大作中提到】 : people use it in oop more than fp. why scala becomes symbolic of fp?
|
l**********n 发帖数: 8443 | 3 imperative and declarative are two broad categories. fp is declarative, oop
is imperative.
【在 p*****2 的大作中提到】 : fp 的对头是 imperative 不是oop
|
p*****2 发帖数: 21240 | 4 oop也可以functional
oop
【在 l**********n 的大作中提到】 : imperative and declarative are two broad categories. fp is declarative, oop : is imperative.
|
l**********n 发帖数: 8443 | 5 oop is based on objects, fp is based on expressions. some languages can do
both oop and fp, which doesn't mean oop can do fp. js can do both oop and fp
. but it doesn't mean oop can do fp.
【在 p*****2 的大作中提到】 : oop也可以functional : : oop
|
p*****2 发帖数: 21240 | 6 所以说oop和fp不矛盾
fp
【在 l**********n 的大作中提到】 : oop is based on objects, fp is based on expressions. some languages can do : both oop and fp, which doesn't mean oop can do fp. js can do both oop and fp : . but it doesn't mean oop can do fp.
|
l**********n 发帖数: 8443 | 7 没有矛盾啊,js里function本身就是object,可以有properties。同时function是
first class object。
【在 p*****2 的大作中提到】 : 所以说oop和fp不矛盾 : : fp
|
p*****2 发帖数: 21240 | 8 没错
【在 l**********n 的大作中提到】 : 没有矛盾啊,js里function本身就是object,可以有properties。同时function是 : first class object。
|