计算机专业外文文献论文翻译1

上传人:小** 文档编号:91160129 上传时间:2019-06-26 格式:DOC 页数:12 大小:54.52KB
返回 下载 相关 举报
计算机专业外文文献论文翻译1_第1页
第1页 / 共12页
计算机专业外文文献论文翻译1_第2页
第2页 / 共12页
计算机专业外文文献论文翻译1_第3页
第3页 / 共12页
计算机专业外文文献论文翻译1_第4页
第4页 / 共12页
计算机专业外文文献论文翻译1_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《计算机专业外文文献论文翻译1》由会员分享,可在线阅读,更多相关《计算机专业外文文献论文翻译1(12页珍藏版)》请在金锄头文库上搜索。

1、外文文献:Evolving Java Without Changing the LanguageIn The Feel of Java James Gosling stated that: Java is a blue collar language. Its not PhD thesis material but a language for a job. Java feels very familiar to many different programmers because I had a very strong tendency to prefer things that had b

2、een used a lot over things that just sounded like a good idea.The extraordinary success of Java offers weight to the notion that this was a sensible approach, and if it remains an important goal for Java today, then it makes sense that the language should continue to evolve relatively slowly. In add

3、ition to this, the fact that Java is a mature, widely used language causes its evolution to be fraught with difficulty. For one thing, each feature added to the language can change the way it feels in subtle and often unpredictable ways, risking alienating developers who have already adopted it as t

4、heir language of choice. For another, a feature that makes perfect sense on its own may interact with other features of the language in awkward or unexpected ways. Worse, once a language feature has been added it is all but impossible to remove even if it turns out to be detrimental to the language

5、as a whole. To justify adding a new feature, a language designer must be highly confident that it will be of long term benefit to the language rather than a short term or fashionable solution to a problem that rapidly becomes redundant. To mitigate the risk a language designer will typically experim

6、ent by creating a separate language or branch, such as the Pizza language used to experiment with Javas generics, prior to their implementation. The problem with this approach is that the audience for such experiments is both small and self-selecting; obviously they will all be interested in languag

7、e features, and many may be academics or researchers. An idea which plays well to such an audience may still play badly when it is incorporated into the main language and general programmers start to work with it.To get a sense of this, consider the closures debate that became so heated for Java 7.

8、Implementations for the main proposals (and some others) have been available for some time but no consensus has emerged. In consequence Sun decided that JDK 7 will not get full closures support. The core argument came down to whether Java had become as complex as it could afford to be when generics

9、(and in particular the wildcard syntax) were added to Java 5; and whether the addition of full support for closures was justified when Java already has a more limited form through anonymous inner classes. Two important use cases for adding full closures support were to simplify working with the fork

10、/join API that is being added to JDK 7 to improve multi-core programming, and to help with resource clean-up. Josh Blochs ARM block proposal, which is now expected to be in JDK 7 via Project Coin, offers an alternative solution to the latter problem. Dr. Cliff Clicks research on a scalable, non-bloc

11、king programming style for Java offers an alternative approach to fork/join that may be more appropriate as the number of processor cores increases. If this were to happen, then the uses for closures in Java may arguably be too limited to justify their inclusion.It remains important though that a pr

12、ogramming language continues to develop at some level. This article therefore examines three alternative techniques for adding new language features to Java that dont require changes to the language itself - using a custom Domain Specific Language, exploiting the Java 6 annotation processor to add o

13、ptional language features via a library, and moving the syntactic sugar from the language to the IDE. Each offers the potential to allow a wide audience of mainstream developers to experiment with the new features over the medium term in a non-invasive manner, and the best ideas can then filter down

14、 for inclusion in the core language.Custom DSLsThe most widely discussed of the three is the Domain-Specific Language or DSL. There is some disagreement on exactly what the term means, but for the purposes of this discussion well refer to it simply as a language that has been created with a narrow f

15、ocus to solve a particular problem, rather than as a general purpose language designed to solve every computing problem. As such we would expect a DSL to be non-Turing complete and for the most part this is the case. There are edge cases of course. Postscript, for example, is a Turing complete langu

16、age but also qualifies as a DSL using our definition.As the above example also illustrates, the idea of a DSL is not new. Other familiar DSLs include Regular Expressions, XSLT, Ant, and JSP, all of which require some sort of custom parser to process them. Martin Fowler also suggests that fluent interfaces/APIs can be considered a second type of DSL, which he refers to as an internal DSL. His definition is that an internal DSL is developed directly within the host lan

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号