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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

JEP-455: Primitive types in patterns, instanceof and switch

20 点作者 ludovicianul11 个月前

1 comment

SillyUsername11 个月前
This actually looks like adding complexity.<p>Switch statements are rarely used in my experience in preference to array indexing&#x2F;hashmap&#x2F;properties or just if&#x2F;else.<p>Now Java devs need to remember switches can have guards, do auto boxing, and can do work which is duplicating getters&#x2F;setters or just general purpose validation by annotation (JSR 303 if memory serves).<p>This is a good example of Java becoming bloated imho. Something like JSRs such as streams were useful syntactic sugar for functional and threaded programming, but something like this adds no tangible benefits over what is already in the language.
评论 #40597044 未加载
评论 #40597000 未加载
评论 #40597088 未加载
评论 #40597365 未加载