TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Have Generics Killed Java?

2 点作者 nirav将近 15 年前

2 条评论

michaelcampbell将近 15 年前
He seems to go to great lengths to emphasize the visual clutter in the declaration, but then mentions nothing of the casts that are no longer needed as a result. Anecdotes != proof I know, but I can say that I have caught several typecast mismatches in code I've converted from pre-generic times to using generics.<p>But all that is not what the article is about, really. Say what you will about Java, whether or not it's dead or dying, etc. but I dare say that generics in and of themselves aren't causing the Java ecosystem any substantial damage.
jmount将近 15 年前
No. Even the kind of generics in Java vastly increased the documentary power of the collections. Being able to write thing like Map&#60;Integer,Map&#60;Integer,Double&#62;&#62; (a very crude sparse matrix) is a great boon in readability.
评论 #1538293 未加载