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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

C++ braced initializers and type deduction

50 点作者 krsna大约 11 年前

6 条评论

fauigerzigerk大约 11 年前
The entirety of C++ initialization rules has become a byzantine mess of epic proportions and any change is bound to add another level of combinatorial explosion. There&#x27;s just no way out of it.<p>I can tell you how C++ will die. It will die because all C++ programmers will soon be dead for one simple reason: Our brains are incapable of knowing C++ well enough to write safe C++ code and knowing something else at the same time.<p>Knowing all the rules and exceptions to those rules in C++ will overwhelm the neocortex of C++ programmers and start to usurp older parts of the brain to the point where heart rate and body temperature get out of control and they&#x2F;we all die an agonizing death.<p>As a C++ programmer I am struggling right now trying to leave this path to seemingly inevitable doom. But the insane complexity of C++ has this addictive allure of making me feel so incredibly competent and important, a bearer of secret knowledge that underpins the world&#x27;s most important systems.
评论 #7371957 未加载
评论 #7372502 未加载
评论 #7371864 未加载
评论 #7372817 未加载
etfb大约 11 年前
Oh dear. Scott Meyers calls himself &quot;just a grunt on the ground&quot;. I think we&#x27;re all doomed.
评论 #7371816 未加载
roel_v大约 11 年前
Only slightly related, but I feel (I do not yet have the experience) that &#x27;auto&#x27; is going to make the lives of those reading code 10x harder, for the benefit of those writing code to have to think and type tiny amounts less, and for the writers of template libraries to have to think 10 times less. Especially that last part concerns me great amounts.<p>I&#x27;m not looking forward to the first time I will have to work myself into a code base build around heavy &#x27;auto&#x27; use.
评论 #7372478 未加载
评论 #7373175 未加载
评论 #7372289 未加载
评论 #7372177 未加载
eru大约 11 年前
How does the C++ committee actually work, if the experts can have these kinds of open questions?
评论 #7372388 未加载
评论 #7371641 未加载
评论 #7372815 未加载
peterbotond大约 11 年前
the way i handle c++ complexity is to limit its feature usage to exercise its strength letting it help me solve the problem.<p>c++ is a big language with big grammar, as such offers a lot of different ways to say the same thing. each different construct is understood by a different set of code-readers, same way as in a complex human language. commenting c++ code is part of writing c++ due to this complexity, in my practice.<p>in a complex grammar, the order of words makes a difference and certain relation of grammatical constructs must be obeyed to remain comprehensive and understandable by most people.<p>communications using formal grammar makes it more understandable, versus slang. however both formal and informal convey the same information for the respective group of people.<p>in a programming language, pondering publicly about good and bad practices and their merit helps reading code, of course, with comments.
评论 #7372844 未加载
72deluxe大约 11 年前
I love Scott&#x27;s hair. It looks like an exciting blend of a 1970s progressive rock band and one of Robin Hood&#x27;s merry men. It&#x27;s cool.