p*****2 发帖数: 21240 | 1 all I know is:
after learning Haskell in the evenings/weekends for a few months, reading
language feature tutorials and writing a personal project, I understand
enough about enough typeclasses / GHC extensions / etc to write somewhat
abstract Haskell code without type errors, or to read those type errors and
grok them. the abstractions increase modularity, without decreasing
readability.
after the same time/effort with Scala, I know nothing about Scala's types,
or its errors. |
e*******o 发帖数: 4654 | 2 原作者不会Java吧
and
【在 p*****2 的大作中提到】 : all I know is: : after learning Haskell in the evenings/weekends for a few months, reading : language feature tutorials and writing a personal project, I understand : enough about enough typeclasses / GHC extensions / etc to write somewhat : abstract Haskell code without type errors, or to read those type errors and : grok them. the abstractions increase modularity, without decreasing : readability. : after the same time/effort with Scala, I know nothing about Scala's types, : or its errors.
|
p*****2 发帖数: 21240 | 3
scala的type system比java复杂很多,估计zhaoce,goodbug这样的java大牛学起来也
未必轻松
【在 e*******o 的大作中提到】 : 原作者不会Java吧 : : and
|
l**********n 发帖数: 8443 | 4 杀鸡焉用牛力。
【在 p*****2 的大作中提到】 : : scala的type system比java复杂很多,估计zhaoce,goodbug这样的java大牛学起来也 : 未必轻松
|
z****e 发帖数: 54598 | 5 很难
看得我晕头转向的
scala只能有限度的使用
尽可能多地封装成各种jars
做工具合适
真正干活主力语言还是java
要是真用scala做日常工作
估计用不了多久,头发都掉光了
【在 p*****2 的大作中提到】 : : scala的type system比java复杂很多,估计zhaoce,goodbug这样的java大牛学起来也 : 未必轻松
|
l**********n 发帖数: 8443 | 6 Scala是解决难题的。
【在 z****e 的大作中提到】 : 很难 : 看得我晕头转向的 : scala只能有限度的使用 : 尽可能多地封装成各种jars : 做工具合适 : 真正干活主力语言还是java : 要是真用scala做日常工作 : 估计用不了多久,头发都掉光了
|
e*******o 发帖数: 4654 | 7 干活 不需要精通。
我只是觉得原作者觉得haskell 更好学,肯定是没有学过java,直接上的scala。
【在 p*****2 的大作中提到】 : : scala的type system比java复杂很多,估计zhaoce,goodbug这样的java大牛学起来也 : 未必轻松
|
z****e 发帖数: 54598 | 8 属实
scala完全就是保留了java的绝大部分以及一些patterns
再加上fp
东西太多,从oop或者fp角度看,都不纯
【在 e*******o 的大作中提到】 : 干活 不需要精通。 : 我只是觉得原作者觉得haskell 更好学,肯定是没有学过java,直接上的scala。
|
p*****2 发帖数: 21240 | 9 看怎么说
我学过java 但是还是感觉haskell容易
当然我是从fp和ts角度出发的
【在 e*******o 的大作中提到】 : 干活 不需要精通。 : 我只是觉得原作者觉得haskell 更好学,肯定是没有学过java,直接上的scala。
|
z****e 发帖数: 54598 | 10 其他fp语言比较纯粹,没有oop部分
除了clojure都不运行在jvm上,自然弄起来容易
但是scala强就强在它什么都有,自然弄起来就非常痛苦
花很多时间在scala上,投入成本高,见效慢
最快见效也是在面试时候加点分,但是现在说光靠scala要想弄到工作
也难,现在多数都是java程序员的一个bonus
不像swift,马上就可以写出东西来,投放到app store里面去
很快就有收益 |
|
|
z****e 发帖数: 54598 | 11 看scala代码真是生不如死,我自己写的都看不懂
不知道老头是怎么看懂的,估计它压根就没看
兼容性也做得不好,vert.x上现在代码都转回ruby和groovy了
我看公司里脚本也多数转向jruby和groovy
python,scala向后兼容做得差,导致代码生命周期偏短
保险起见,先不用了,怕以后升级出问题 |
p*****2 发帖数: 21240 | 12
有没有试试clojure?
【在 z****e 的大作中提到】 : 看scala代码真是生不如死,我自己写的都看不懂 : 不知道老头是怎么看懂的,估计它压根就没看 : 兼容性也做得不好,vert.x上现在代码都转回ruby和groovy了 : 我看公司里脚本也多数转向jruby和groovy : python,scala向后兼容做得差,导致代码生命周期偏短 : 保险起见,先不用了,怕以后升级出问题
|
n*****3 发帖数: 1584 | 13 clojure什么都有一点, 什么都要自己造轮子, 也太折磨人了。
我们组试了一个clojure DSL for spark,
我只能说, 跟自己从头写差不多
【在 p*****2 的大作中提到】 : : 有没有试试clojure?
|
t**r 发帖数: 3428 | 14 看了这个帖子的回复,
结论是:
学好java 赚钱发财 娶媳妇 抱娃抱妹子才是正经事 |
p*****2 发帖数: 21240 | 15 In my experience, Scala's is much more complicated. It has to be, in order
to interoperate with Java, include object-oriented programming, and
therefore use a lot of subtyping and attempt to impose principle on it.
Scala seems to be a bazaar in which concepts from Java and Haskell collide,
and there's even some Erlang thrown in (the actor model). Type-wise, these
sub-languages don't always get along well. For what it must do, Scala does a
good job. The problem is that its mandatory first-class support of Java's
type system (with, among other things, its wonky generics) imposes a ton of
complexity. Covariance and contravariance are regarded as advanced features
in Haskell and Ocaml, but in Scala you have to confront them just to
understand type signatures of basic operations.
【在 t**r 的大作中提到】 : 看了这个帖子的回复, : 结论是: : 学好java 赚钱发财 娶媳妇 抱娃抱妹子才是正经事
|
l**********n 发帖数: 8443 | |
z****e 发帖数: 54598 | 17 话说class算不算是一种type?
应该算吧?
type可以包括有int, function和class这些 |
p*****2 发帖数: 21240 | 18 Scala's disjoint part has polymorphic sub-typing and implicit dictionaries.
Haskell's disjoint part has first-class type classes, type-level functions,
full type inference, and many other neat little tweaks. The intersection is
a higher-kinded type system with first-class functions.
Scala's part of the intersection, for a list of reasons that include JVM
type erasure, issues combining higher-kinded types with polymorphic sub-
typing, and certain implementation choices, is partially "broken" in that
its higher-kinded type support is weak enough to make its Haskell-style use
troubled because it doesn't curry types. Some detail: Disadvantages of Scala
type system versus Haskell? This necessitates ingenious workarounds like
Using scalaz.Unapply and fingers-crossed hoping that the implicits don't get
messed up.
To Michael O. Church's perfectly fair point about variance annotations,
people wrestling with Scala's type system tend to come to the conclusion
that given the higher-kinded inference limitations described above, using
variance in Scala is not worth the trouble, and you're better off just
leaving everything invariant. Paul Philips has been working on a fresh take
on Scala collections that doesn't necessitate variance: paulp/psp-std.
Written 7h ago.
【在 z****e 的大作中提到】 : 话说class算不算是一种type? : 应该算吧? : type可以包括有int, function和class这些
|
z****e 发帖数: 54598 | 19 我看到的说法说是算high kind type
但是关键字type跟class还是分离的
可以把一个class定义成某一个type
其意思就是一个alias,我就无脑记这个了
,
is
use
Scala
【在 p*****2 的大作中提到】 : Scala's disjoint part has polymorphic sub-typing and implicit dictionaries. : Haskell's disjoint part has first-class type classes, type-level functions, : full type inference, and many other neat little tweaks. The intersection is : a higher-kinded type system with first-class functions. : Scala's part of the intersection, for a list of reasons that include JVM : type erasure, issues combining higher-kinded types with polymorphic sub- : typing, and certain implementation choices, is partially "broken" in that : its higher-kinded type support is weak enough to make its Haskell-style use : troubled because it doesn't curry types. Some detail: Disadvantages of Scala : type system versus Haskell? This necessitates ingenious workarounds like
|