Java具有只是没有跟上? [英] Has Java just not kept up?

查看:101
本文介绍了Java具有只是没有跟上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码C#一整天,但最近做了一个跳转到Java的爱好的东西,如写为黑莓和Android平台。这一切的时候我以为,只要语言特性去,Java和C#是对方的双胞胎。

I code C# all day, but recently made a jump to Java for hobby stuff, like writing for the BlackBerry and Android platforms. All this time I assumed that as far as language features go, Java and C# were twins of each other.

不过,我发现,Java的是C#1.1或类似的东西相当。在Java中,我不得不写两次的代码,我会在C#。就像对象初始化,λ,性能在上帝的份功能,以往来的Java?我试图通过JSR东西韦德,但没有发现任何东西。

Anyway, I discovered that Java is the equivalent of C# 1.1 or something like that. In Java, I have to write twice the code that I would in C#. Are features like object initializers, lambda, properties for god's sake, ever coming to Java? I tried to wade through the JSR stuff, but couldn't find anything.

Java具有根本没有跟上?还是我根本就没有使用它,因为它的目的是?

Has Java simply not kept up? Or am I simply not using it as it is intended?

推荐答案

我觉得你说得对,Java没有很多那C#引入了方便的新功能。很多新的C#功能只是编译器技巧,以(属性,对象intitializers,扩展方法),您可以用手在C#或Java实现。

I think you're right, Java does not have a lot of the convenient new features that C# has introduced. A lot of the new C# features are just compiler tricks to (properties, object intitializers, extension methods) that you can accomplish by hand in C# or Java.

JAVA的人可能是因为他们可能宁愿保持语言的简单和尽可能向后兼容还没有推出这些新功能。

The Java people probably haven't introduced these new features because they probably prefer to keep the language as simple and backwards-compatible as possible.

我必须说,我宁愿写C#这些天。

I do have to say I prefer writing C# these days.

这篇关于Java具有只是没有跟上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆