由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - anyone using Scala ?
相关主题
基于JVM的脚本语言Getting bytecode of a class
Everyone hate java now? (转载)Re: how to access the overrided fields o
Java basic concept(1)java的接口runnable
入门Java CLASSPATH问题:c,java, 数据库内核,数据库应用
JSP is rubbish!求助大家 如何用 Eclipse 给一个project加入image
请问java有办法隐藏source code吗type erasure weird problem
self-modifying code?最近node.js real time web 很火
Question on J2EE container请教问题:什么decompiler比较好
相关话题的讨论汇总
话题: scala话题: java话题: language
进入Java版参与讨论
1 (共1页)
c******n
发帖数: 4965
1
twitter 用,
不知道真是有什么好处还是fad
m******t
发帖数: 2416
2

I looked at it a while ago but haven't used
on any real project. Neat language features
but, from I read, when they are heavily used
the performance becomes an issue.

【在 c******n 的大作中提到】
: twitter 用,
: 不知道真是有什么好处还是fad

k***r
发帖数: 4260
3
twitter's been saying that it's great and performant.
I'm very not used to the syntax of the language. It looks
so odd - I'm coming from Python and Java

【在 m******t 的大作中提到】
:
: I looked at it a while ago but haven't used
: on any real project. Neat language features
: but, from I read, when they are heavily used
: the performance becomes an issue.

m******t
发帖数: 2416
4

If you come from python, you should be comfortable with
list comprehension which I believe scala has for one of the
core concepts.
I still don't know about it being performant. To my taste,
scala puts too much emphasis on recurse, which can be
fairly expensive if not done right. Also functional
programming being neat and cool and all, it comes with
a performance penalty.

【在 k***r 的大作中提到】
: twitter's been saying that it's great and performant.
: I'm very not used to the syntax of the language. It looks
: so odd - I'm coming from Python and Java

k***r
发帖数: 4260
5
I think the reason people think it's performant is that
its data types are closer to that of Java's. Not much
heavy translation is needed, as in Jython or JRuby's case.
It's also strongly and statically typed. This helps a lot.
Have you looked at Lift, the web framework? The simplicity
in Lift makes me want to check out Scala.

【在 m******t 的大作中提到】
:
: If you come from python, you should be comfortable with
: list comprehension which I believe scala has for one of the
: core concepts.
: I still don't know about it being performant. To my taste,
: scala puts too much emphasis on recurse, which can be
: fairly expensive if not done right. Also functional
: programming being neat and cool and all, it comes with
: a performance penalty.

b******y
发帖数: 9224
6
seems scala could be run both interpreted or compiled, right?
b******y
发帖数: 9224
7

Yes, I am a believer the more complication a language is, the less efficient
it will be.
But that being said, seems like scala is a good language that is worth to
checkout.
Maybe we should make this board a forum both for java and for close
languages such as scala ;-)

【在 m******t 的大作中提到】
:
: If you come from python, you should be comfortable with
: list comprehension which I believe scala has for one of the
: core concepts.
: I still don't know about it being performant. To my taste,
: scala puts too much emphasis on recurse, which can be
: fairly expensive if not done right. Also functional
: programming being neat and cool and all, it comes with
: a performance penalty.

k***r
发帖数: 4260
8
It's compiled. The way it "interprets" it is to compile
it in memory, which is neat.

【在 b******y 的大作中提到】
: seems scala could be run both interpreted or compiled, right?
N*D
发帖数: 3641
9
未必"the more complication, the less efficient"吧。这个是syntax复杂在front e
nd,compile之后还是byte code在JVM上执行。不好说这个scala的compiler好还是java
的compiler好。而且写这个的人是java compiler原作者,俺合理的推断,有些前面的e
xperience,这个scala的compiler可能更好。

Yes, I am a believer the more complication a language is, the less efficient
it will be.
But that being said, seems like scala is a good language that is worth to
checkout.
Maybe we should make this board a forum both for java and for close
languages such as scala ;-)

【在 b******y 的大作中提到】
:
: Yes, I am a believer the more complication a language is, the less efficient
: it will be.
: But that being said, seems like scala is a good language that is worth to
: checkout.
: Maybe we should make this board a forum both for java and for close
: languages such as scala ;-)

k***r
发帖数: 4260
10
compiler效率在scala中不是priority。我记得看到一篇文章说
作者想把直接compile成bytecode改成compile成java source,
然后用javac。其实scala是wrap java data types,会慢一些,
但因为是statically typed,还是比jython/jruby之类的快很多。

e
java
的e
efficient

【在 N*D 的大作中提到】
: 未必"the more complication, the less efficient"吧。这个是syntax复杂在front e
: nd,compile之后还是byte code在JVM上执行。不好说这个scala的compiler好还是java
: 的compiler好。而且写这个的人是java compiler原作者,俺合理的推断,有些前面的e
: xperience,这个scala的compiler可能更好。
:
: Yes, I am a believer the more complication a language is, the less efficient
: it will be.
: But that being said, seems like scala is a good language that is worth to
: checkout.
: Maybe we should make this board a forum both for java and for close

相关主题
请问java有办法隐藏source code吗Getting bytecode of a class
self-modifying code?Re: how to access the overrided fields o
Question on J2EE containerjava的接口runnable
进入Java版参与讨论
N*D
发帖数: 3641
11
scala不是wrap java,it跟java是parallel的。比如scala里面没有primary type,即
使x = y + z也是三个objects。但compile成byte code后,和java的是一摸一样的。不
存在wrap一说。JVM类似提供了一个ISA,scala实在没必要转成java first,当然it可
能会使用一些java compiled bytecode的template,而且只会使用安全高效的。比如it
取消了static,加入了singleton的object,他compile出来的bytecode肯定是安全和高
度优化的,会比大多数的developer写出来的强。
俺也是在学习过程中,一些拙见,呵呵。

compiler效率在scala中不是priority。我记得看到一篇文章说
作者想把直接compile成bytecode改成compile成java source,
然后用javac。其实scala是wrap java data types,会慢一些,
但因为是statically typed,还是比jython/jruby之类的快很多。

【在 k***r 的大作中提到】
: compiler效率在scala中不是priority。我记得看到一篇文章说
: 作者想把直接compile成bytecode改成compile成java source,
: 然后用javac。其实scala是wrap java data types,会慢一些,
: 但因为是statically typed,还是比jython/jruby之类的快很多。
:
: e
: java
: 的e
: efficient

k***r
发帖数: 4260
12
i've seen a presentation that quotes some benchmark numbers.
Basically in those tests Java has around 41% of the performance
of C while scala has 40%. So they are fairly close.

it

【在 N*D 的大作中提到】
: scala不是wrap java,it跟java是parallel的。比如scala里面没有primary type,即
: 使x = y + z也是三个objects。但compile成byte code后,和java的是一摸一样的。不
: 存在wrap一说。JVM类似提供了一个ISA,scala实在没必要转成java first,当然it可
: 能会使用一些java compiled bytecode的template,而且只会使用安全高效的。比如it
: 取消了static,加入了singleton的object,他compile出来的bytecode肯定是安全和高
: 度优化的,会比大多数的developer写出来的强。
: 俺也是在学习过程中,一些拙见,呵呵。
:
: compiler效率在scala中不是priority。我记得看到一篇文章说
: 作者想把直接compile成bytecode改成compile成java source,

F****n
发帖数: 3271
13
Declarative Programming is not a new thing, and declarative / procedural
programming are conceptually different. To mix them together in one language
like Scala, is not necessarily a good thing, because it will only create
conceptual confusion and implementation nightmare (anyone has experience
with Lisp / Prolog would know what I am talking about).
The cleaner solution is to incorporate declarative features at the meta
level for a procedural language. Probably they should work on something
base

【在 k***r 的大作中提到】
: i've seen a presentation that quotes some benchmark numbers.
: Basically in those tests Java has around 41% of the performance
: of C while scala has 40%. So they are fairly close.
:
: it

k***r
发帖数: 4260
14
您老说的我还不了解,不过scala除了看上去怪一点,好像是我想
用的high level language that has static typing,而且library
很rich (all Java libraries available)。感觉太学术的东西
好像也不一定实用,这一点scala looks promising

language

【在 F****n 的大作中提到】
: Declarative Programming is not a new thing, and declarative / procedural
: programming are conceptually different. To mix them together in one language
: like Scala, is not necessarily a good thing, because it will only create
: conceptual confusion and implementation nightmare (anyone has experience
: with Lisp / Prolog would know what I am talking about).
: The cleaner solution is to incorporate declarative features at the meta
: level for a procedural language. Probably they should work on something
: base

F****n
发帖数: 3271
15
Hoho, there is another language that is a high-level language with static
typing and with all Java libraries available: Java

【在 k***r 的大作中提到】
: 您老说的我还不了解,不过scala除了看上去怪一点,好像是我想
: 用的high level language that has static typing,而且library
: 很rich (all Java libraries available)。感觉太学术的东西
: 好像也不一定实用,这一点scala looks promising
:
: language

k***r
发帖数: 4260
16
level 还不够 high,打字太多,呵呵

【在 F****n 的大作中提到】
: Hoho, there is another language that is a high-level language with static
: typing and with all Java libraries available: Java

m******t
发帖数: 2416
17

I found some benchmarks on a site which I can't seem to find
any more. Basically the takeaway point from those benchmarks
was that scala and java are pretty close for mostly procedural
code, but as soon as you get into functional programming,
scala's performance starts dropping.
That's not saying scala is an inefficient language. It's
just the fact well-known-for-four-decades that functional
programming provides convenience and conceptual simplicity
at the price of efficiency.

【在 k***r 的大作中提到】
: i've seen a presentation that quotes some benchmark numbers.
: Basically in those tests Java has around 41% of the performance
: of C while scala has 40%. So they are fairly close.
:
: it

k***r
发帖数: 4260
18
Interesting. Can I attribute the slowness in functional tests
to manipulating existing objects is faster than copying objects
and then making changes to them?

【在 m******t 的大作中提到】
:
: I found some benchmarks on a site which I can't seem to find
: any more. Basically the takeaway point from those benchmarks
: was that scala and java are pretty close for mostly procedural
: code, but as soon as you get into functional programming,
: scala's performance starts dropping.
: That's not saying scala is an inefficient language. It's
: just the fact well-known-for-four-decades that functional
: programming provides convenience and conceptual simplicity
: at the price of efficiency.

F****n
发帖数: 3271
19
Declarative programming is slow because modern computers are procedural in
nature. Declarative programming needs very complicated indexing / caching
structure to optimize queries. It's an advanced AI topic. It is impossible
to solve based on good implementation. Someone will win 2-3 Turing Awards if
he / she develops a declarative programming model as fast as procedural
languages. That's why the innovative part of Scala is dubious.

【在 k***r 的大作中提到】
: Interesting. Can I attribute the slowness in functional tests
: to manipulating existing objects is faster than copying objects
: and then making changes to them?

b******y
发帖数: 9224
20
"It's an advanced AI topic"
haha, love it Foxman, you hit the nail onto the head.
我觉得其实computing 40多年以来,最好的还是good old c programming. Java也不错
。但scala学习一下不错,不知道将来是否会有市场。
我曾今学过Prolog, 觉得和AI相关的东西太深的都是忽悠。工业界和现实当中,最可靠
最好的还是扎扎实实的procedural programming. 加点儿Object oriented也就不错了
相关主题
c,java, 数据库内核,数据库应用最近node.js real time web 很火
求助大家 如何用 Eclipse 给一个project加入image请教问题:什么decompiler比较好
type erasure weird problem求解释一下java decorator
进入Java版参与讨论
b******y
发帖数: 9224
21
另外,我只对high performance computing感兴趣,所以对于我来说,任何
inefficient的programming language或者tools都没有太大的吸引力。
k***r
发帖数: 4260
22
我对high productivity更感兴趣,呵呵,因为很多情况下可以
用好机器或者多台机器提高performance,却不容易提高一个
developer,比如我自己,的productivity。所以dynamic language
或者不那么dynamic但是省很多typing的language,比如scala,
有用武之地。

【在 b******y 的大作中提到】
: 另外,我只对high performance computing感兴趣,所以对于我来说,任何
: inefficient的programming language或者tools都没有太大的吸引力。

F****n
发帖数: 3271
23
Actually declarative programming can be extremely difficult to debug, which
may drop your productivity.

【在 k***r 的大作中提到】
: 我对high productivity更感兴趣,呵呵,因为很多情况下可以
: 用好机器或者多台机器提高performance,却不容易提高一个
: developer,比如我自己,的productivity。所以dynamic language
: 或者不那么dynamic但是省很多typing的language,比如scala,
: 有用武之地。

k***r
发帖数: 4260
24
To be honest, and I'm sure this has something to do with
the fact that I'm not an expert of programming languages,
I haven't found a great deal of differences between scala
and Java, or between scala and Python, given that the syntax
of Scala is the oddest of the three.
Of course they are all different, but not in big ways to me,
especially between scala and Java, both of which are statically
typed. Scala's advantages such as type inference, and other
form of simplifications (omission of bracket

【在 F****n 的大作中提到】
: Actually declarative programming can be extremely difficult to debug, which
: may drop your productivity.

F****n
发帖数: 3271
25
Declarative programming is what they advocate Scala for. If you don't use DP
, then why invest huge time on another dialect of Java or Python or Smalltalk. If you use DP, it
will give your headache sooner or later. That's Scala's dilemma.

【在 k***r 的大作中提到】
: To be honest, and I'm sure this has something to do with
: the fact that I'm not an expert of programming languages,
: I haven't found a great deal of differences between scala
: and Java, or between scala and Python, given that the syntax
: of Scala is the oddest of the three.
: Of course they are all different, but not in big ways to me,
: especially between scala and Java, both of which are statically
: typed. Scala's advantages such as type inference, and other
: form of simplifications (omission of bracket

k***r
发帖数: 4260
26
I've already explained why lah. Much less typing for Scala.
Much shorter and more flexible code for Python, well worth it
for some projects even w/o any benefit of DP.

DP
Smalltalk. If you use DP, it

【在 F****n 的大作中提到】
: Declarative programming is what they advocate Scala for. If you don't use DP
: , then why invest huge time on another dialect of Java or Python or Smalltalk. If you use DP, it
: will give your headache sooner or later. That's Scala's dilemma.

1 (共1页)
进入Java版参与讨论
相关主题
请教问题:什么decompiler比较好JSP is rubbish!
求解释一下java decorator请问java有办法隐藏source code吗
求助JAVA问题self-modifying code?
Java 做网站Question on J2EE container
基于JVM的脚本语言Getting bytecode of a class
Everyone hate java now? (转载)Re: how to access the overrided fields o
Java basic concept(1)java的接口runnable
入门Java CLASSPATH问题:c,java, 数据库内核,数据库应用
相关话题的讨论汇总
话题: scala话题: java话题: language