﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-云-文章分类-翻译</title><link>http://www.blogjava.net/matuobasyouca/category/51214.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 23 Mar 2012 14:41:21 GMT</lastBuildDate><pubDate>Fri, 23 Mar 2012 14:41:21 GMT</pubDate><ttl>60</ttl><item><title>Java 8 新特性</title><link>http://www.blogjava.net/matuobasyouca/articles/372583.html</link><dc:creator>一酌散千忧</dc:creator><author>一酌散千忧</author><pubDate>Fri, 23 Mar 2012 14:37:00 GMT</pubDate><guid>http://www.blogjava.net/matuobasyouca/articles/372583.html</guid><wfw:comment>http://www.blogjava.net/matuobasyouca/comments/372583.html</wfw:comment><comments>http://www.blogjava.net/matuobasyouca/articles/372583.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/matuobasyouca/comments/commentRss/372583.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/matuobasyouca/services/trackbacks/372583.html</trackback:ping><description><![CDATA[<p><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">我们正焦急等待的</span>Java8<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">中将会支持一些新特性，这些新特性本应当在</span>Java7<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">中加入却被推迟了。现在，</span>Oracle<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">承诺新版本将会是&#8220;革命，而非进化&#8221;。</span>Java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">语言的前景将会如何？</span></p>  <p><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">在</span>2011JavaOne<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">回忆中，</span>Oracle<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的</span>Java<span style="font-family: 宋体;Times New Roman&quot;;Times New Roman&quot;">首席架构师</span>Mark Reinhold<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">给大众介绍了一部分</span>Java8<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的特性，以及</span>Java9<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的一些计划。不幸的是，本在</span>Java7<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">中计划的</span>5<span style="font-family: 宋体;Times New Roman&quot;;Times New Roman&quot;">个关键改进，其中有</span>2<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">个因为</span>Java release<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">版本的日期原因被暂时搁置。</span>Mark<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">承认</span>Java7<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的更新非常重要，但是暗示了</span>Java8<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">将在基础层面改变原本语言的功能。看一下特性列表，应该是接近真实的。</span></p>  <p>Java8<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的</span>release<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">版本将包含两个主要项目：</span>Lambda <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">和</span> Jigsaw. <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">在</span>Lambda<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">项目中</span>, Java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">将提升优化在多核处理系统中的有效能力。多核是</span>Java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">将会运行的最常见的硬件支持，所以还是非常有必要优化在多核平台的性能的。</span>Lambda<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">项目将包含一个额外的支持将代码模型化为数据的编程模式的处理系统</span>[1]<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">。新处理系统能够方便地使用</span>Lambda<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">表达式</span>, <span style="font-family: 宋体;Times New Roman&quot;;Times New Roman&quot;">作为多核平台的最佳处理方式。这些新特性包括：</span></p>  <p style="margin-left:21.0pt;text-indent:-21.0pt;"><span style="font-family:Wingdings;">l&nbsp;</span>Lambda <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">表达式的使用</span></p>  <p style="margin-left:21.0pt;text-indent:-21.0pt;"><span style="font-family: Wingdings;">l&nbsp;</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">扩展的目标类型化</span></p>  <p style="margin-left:21.0pt;text-indent:-21.0pt;"><span style="font-family: Wingdings;">l&nbsp;</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">方法与构造函数引用</span></p>  <p style="margin-left:21.0pt;text-indent:-21.0pt;"><span style="font-family: Wingdings;">l&nbsp;</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">默认方法</span></p>  <p><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">若想对</span>Lambda <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">项目了解更多，请访问</span>:http://openjdk.java.net/projects/lambda/</p>    <p>Java8<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">第二个激动人心的项目就是</span>Jigsaw<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">。</span>Jigsaw<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">目的是在</span>JDK<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">中建立一套设计和实施模块化系统的行之有效的方法，并将该模块化系统直接应用于</span>JDK<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">本身。这是为了加强大块代码的可维护性以及提升代码在跨应用程序或大型操作时的可用性。</span>Jigsaw<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">项目带来了相当多的新特性，包括封装，重构，版本控制和模块集成。</span></p>  <p><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">若想对</span>Jigsaw<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">项目了解更多，请访问</span>:http://openjdk.java.net/projects/ jigsaw /</p>  <p><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">通过上述两个项目</span>, <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">还将会有其他的语言特征加入，如：</span> <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">加强了</span>Java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">核心库能够简单的表达集合（</span>collections<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">）的并行计算并且</span> virtual extension methods <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">运行在接口中给一个方法指定默认实现。支持传感器的新</span>Date/Time API<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">将增加代码的可部署方式。</span></p>  <p>Oracle <span style="font-family: 宋体;Times New Roman&quot;;Times New Roman&quot;">正在规划并开始讨论</span>Java9<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">开发的关键领域。他们正在考察建立一个自调节的</span>JVM<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">（针对运行效率和性能），改进本地集成和大规模多核可伸缩性。并且在考虑通过元对象协议和资源管理提供对云程序的跨语言支持。</span>Java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">有着巨大的开发者基数从而正在逐步成为世界上最常用的编程语言，所以</span>Java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的新特性并不能让迎合所有人。</span>Oracle<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">期望</span>Java<span style="font-family: 宋体;Times New Roman&quot;;Times New Roman&quot;">成为未来应用程序的最主要的编程语言，不仅推动了语言的进步，也能同时取得开发者的欢心。</span></p>  <p>&nbsp;</p>  <p>[1]: Given the increasing relevance of callbacks and other functional-style idioms, it is important that modeling code as data in Java be as lightweight as possible.<span style="font-family: 宋体;Times New Roman&quot;;Times New Roman&quot;">从官网上摘抄的一段，对于</span>modeling code as data<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的理解，</span>modeling<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">应当是动词所以最后还是翻译为将代码模型化为数据。</span></p>  <p>[2]: http://www.disi.unige.it/person/ZuccaE/FOOL2011/goetz-slides.pdf <span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">这个</span>pdf<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">解释了很多</span>Java8<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">的特性&nbsp;</span></p>  <p>&nbsp;<br /></p>  <p>&nbsp;</p>  <p><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">原文引用：</span><a href="http://www.learncomputer.com/java-8-new-features/">http://www.learncomputer.com/java-8-new-features/</a></p>  <p>&nbsp;</p><img src ="http://www.blogjava.net/matuobasyouca/aggbug/372583.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/matuobasyouca/" target="_blank">一酌散千忧</a> 2012-03-23 22:37 <a href="http://www.blogjava.net/matuobasyouca/articles/372583.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>