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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

C# is getting “?.”, sometimes called the Safe Navigation Operator

27 点作者 mendicant大约 11 年前

2 条评论

mcv大约 11 年前
Great news. The ?. operator in Groovy greatly reduces boilerplate code and improves readability and maintainability. No layers of null pointer checks that are all basically the same and getting in the way of what you actually want to do.<p>And in those cases where you still need specific behaviour based on which object is null, you can still use the . operator with traditional null pointer checks.
mendicant大约 11 年前
The question I have about this: Does making it easy to do parent?.child?.grandchild?.property help or hinder the software development process in the long term?
评论 #7307251 未加载
评论 #7309011 未加载
评论 #7308868 未加载
评论 #7307880 未加载