为什么 CDC 基于旧版本的 Java,而不是当前 SE 的子集?
在 CDC 中编程时,我总是重新发明轮子,重新实现诸如 Arrays.toString(Object[]) 之类的东西。为什么会这样呢? CDC(以及 FP、PBP 等)难道不能成为当前版本 SE 的子集,而不是基于旧的(我可以说是过时的吗?)版本的 Java 吗?
这可能有一个很好的理由,但我看不到。
When programming in CDC I'm always reinventing the wheel, re-implementing stuff like Arrays.toString(Object[])
. Why is it this way? Couldn't CDC (and FP, PBP, etc) be a subset of the current edition of SE, instead of being based on an old (may I say obsolete?) version of Java?
There might be a good reason for this, but I fail to see it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
答案很简单,摩尔定律。
在其通常的表述中,它表示为“经济生产的芯片上的晶体管数量大约每 18 个月增加一倍”。
然而,从另一个角度来看,也可以说,如果“能力”(即晶体管的数量)保持固定,那么成本可以随着时间的推移而降低。
这是 Java ME 执行委员会所持的观点,因此参考设备并不比 4 年前或更多年前更强大 - 但它们便宜得多。这对于 CDC 试图涉足的领域很重要,但这确实意味着与 SE 子集所需的设备相比,设备通常动力不足。
CDC 规范的重新基线正在进行中,以使其更接近 SE。 Java 8 及其模块化支持也将使这变得更容易。
最终目标是将 ME 融合到 SE 的子集,但这还需要几个版本。
The answer is simply, Moore's Law.
In its usual formulation, it's expressed as "the number of transistors on an economic-to-produce chip roughly doubles every 18 months".
However, looked at another way, it could also say that if the "capability" (i.e. number of transistors) is held fixed, then the cost can be driven down over time.
This is the view that the Java ME executive committee took, so the reference devices are no more powerful than they were 4 or more years ago - but they are much cheaper. This matters to the space that CDC is trying to play in, but it does mean that devices are typically underpowered compared to what's needed for an SE subset.
A rebaseline of the CDC spec is underway, to bring it closer to SE. Java 8, with its modularity support will also make this easier.
Ultimately the goal is convergence of ME to a subset of SE, but this will take several more releases yet.
它们是 - CDC 是 JavaSE 定义时“当前”版本的子集。 (即 CLDC1.0 > JSR30 > 1999 年 8 月批准 > 基于 JavaSE 1.3)
CDC、CLDC、FP、PBP...都是规范 - 及时冻结 - 它们无法更新。
更新规范意味着推出新规范(例如 CDC2.0),然后您将拥有一些符合旧规范的设备,以及一些符合新规范的设备。
除此之外,考虑一下前提“CDC ...针对资源受限的设备(例如消费产品和嵌入式设备)进行了高度优化”——我们正在谈论 1999 年的资源受限设备。
They are - CDC is a subset of what was the 'current' version of JavaSE when it was defined. (ie. CLDC1.0 > JSR30 > approved in aug. 1999 > based on JavaSE 1.3)
CDC, CLDC, FP, PBP... are all specifications - frozen in time - they cannot be updated.
Updating an specification would mean launching a new one (eg. CDC2.0) - and then you would have some devices compliant to the old one and some to the new one.
Besides that, consider the premise "CDC is ... highly optimized for resource-constrained devices, such as consumer products and embedded devices" - and we're talking about resource-constrained devices in 1999.