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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Defective C++

17 点作者 bobsmith432大约 1 年前

3 条评论

markisus大约 1 年前
It’s funny because you really have to have a lot of experience with the language to articulate these issues. C++ is the worst language, besides all the other ones, when it comes down to performance and third party library availability.<p>I’ll just throw in my own pet peeves here.<p>The existence of .h files is still a big problem. I’m not aware of another language (besides c of course) that basically forces you to type the same letters twice in slightly different ways in order to expose a public api.<p>I also don’t understand why there’s still no way to print an enum value.<p>However there is some progress. I think std::span fixes the issue with the vector of const vs const vector. The Eigen library gives a (not perfect, but very convenient) matrix type. And I think I heard something about modules?
评论 #39660143 未加载
评论 #39652904 未加载
Bostonian大约 1 年前
Should have (2009) in the title. I don&#x27;t know enough about C++ to say which of the problems have been fixed since then.
thegrim000大约 1 年前
Well the very first item in the list is wrong so I stopped reading there. Have your interface between systems be pure abstract virtual classes so that changing private members in a concrete subclass doesn&#x27;t propagate the change to the consumers.
评论 #39639690 未加载