Dedian  
-- 关注搜索引擎的开发
日历
<2006年4月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
统计
  • 随笔 - 82
  • 文章 - 2
  • 评论 - 228
  • 引用 - 0

导航

常用链接

留言簿(8)

随笔分类(45)

随笔档案(82)

文章档案(2)

Java Spaces

搜索

  •  

积分与排名

  • 积分 - 64852
  • 排名 - 816

最新评论

阅读排行榜

评论排行榜

 

Follow is some guy's complaint for Java programming...
somehow, it is true, but only true. I'd like to say that no language is perfect...

Quote:

Java is a poor programming language.

There, I said it. I've been using Java since it first became generally available and my opinion of it has, if anything, lessened over the years. Just off the top of my head, the major problems include:

Enforcing a Single Paradigm
Object oriented techniques provide some powerful mechanisms for managing dependencies between components of a software system, but they are not the only useful techniques. Languages that support multiple paradigms, including functional approaches, are much more powerful.
Limited Object Model
Actually, the term "single paradigm" above is overstating the case. Java is a partial paradigm language, supporting only a subset of OO. Single inheritance of implementation (prohibiting mix-ins) and no support for multiple dispatch are significant restrictions.
Not only is Java's object model limited, it is inconsistent. Consider int vs. Integer for just one example.
Bondage & Discipline
Some programmers will argue in favor of restrictions like single inheritance as enforcing the "right" way to develop software. Those programmers are welcome to tie themselves up and hand Duke a riding crop, but I want a language that empowers developers, not one that constrains them.
Generics
The implementation of generics in 1.5 is what one would expect from a partial-paradigm language: a large increase in complexity in exchange for minimal benefit.
No Destructors
Resource Acquisition Is Initialization (RAII) is a very useful pattern that can only be implemented clumsily in Java.
Verbosity
Java is verbose. Java is painfully verbose. Java is incredibly, unnecessarily, excrutiatingly painfully verbose. Part of this verbosity is due to its type system. A significant additional influence is the requirement to declare exceptions and the proliferation of try/catch blocks.
Lack of Expressiveness
Java's verbosity and limited object model make it an inexpressive language. These problems could be ameliorated if it were possible to manipulate the language somehow, but Java doesn't provide support for Lisp-like macros. Or C-like macros. Heck, it doesn't even have typedef.
Given the ever increasing complexity in each release, Java is well on its way to becoming the COBOL of the noughties.
Nothing New
The most damning criticism of Java is that it doesn't progress the state of the art. When Alexander Stepanov was asked about his use of Java, his response was "For the first time in my life, programming in a new language did not bring me new insights." Juxtapose that with Alan Perlis' famous quote: "A language that doesn't affect the way you think about programming, is not worth knowing."

Despite these issues and many others, Java does have one saving grace: support for mobile code. Jini is a truly innovative technology for developing large, distributed, mission-critical systems. Retrieving proxies or entire services at runtime is only possible because Java classes can be serialized and dynamically loaded.

The ability to build scalable, resilient, performant, and extensible service oriented architectures without the need for SOAP, UDDI, and WSDL makes up for a multitude of sins.

posted on 2006-04-19 02:13 Dedian 阅读(174) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
 
Copyright © Dedian Powered by: 博客园 模板提供:沪江博客