akka java 中文,Akka Scala和Java之间的区别

尽管Akka的大部分资料集中在Scala版本上,但在Java中使用它不会有明显的性能差异,因为运行的是相同的字节码。然而,在API使用上,Java开发者可能会感到受限,无法利用Scala的特性如闭包。尽管如此,从功能和性能角度看,两者基本一致。请注意,Java代码与库的交互方式与Scala不同,且Java缺少一些Scala的高级语言构造。
摘要由CSDN通过智能技术生成

I am considering using Akka in one of my projects, but I have to use only Java. A majority of the material (books/articles) are on Scala version, so I am wondering if I use Java I would be a second-class citizen.

Are there any significant functional/performance differences between the two?

Thanks

解决方案

In terms of performance of Akka itself it will be the same since you are going to be running the same Akka byte code. However in terms of integrating you will be using the Java API and be limited to the language features of Java. As such you will be a second-class citizen in terms of using the API. However in functional and performance terms it will be pretty much identical. Just keep in mind that your Java code will be interacting with the library differently from Scala code. With Scala you have access to closure and other constructs that you cant use with Java (yet). Nevertheless Akka is a great library also when used from Java....

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值