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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

C for everyone else

14 点作者 Herdinger超过 11 年前

2 条评论

unwind超过 11 年前
This is very well-intended, but it suffers from <i>both</i> lots of formatting errors and pure factual ones. It makes my highly conditioned (from Stack Overflow) C lecturing mode almost auto-trigger.<p>It&#x27;s way too long to do a rebuttal here, though.<p>Some problems:<p>- Bad terminology (&quot;C has no object&quot;, when in fact the term really is very useful in C even though it probably doesn&#x27;t mean what you expect if you come from C++ or Python)<p>- &quot;Booleans don&#x27;t exist&quot;, I don&#x27;t understand how the author can both acknowledge C99 and say this. Booleans <i>do</i> exist! Their name is not so user-friendly, unless you include stdbool.h, then you get bool, true and false.<p>- Pure random errors, like the first structure example code (&quot;struct point foo={x: 5, y: 4};&quot;, what are those colons and numbers doing there?!)<p>And so on.
评论 #6761898 未加载
评论 #6762110 未加载
评论 #6762223 未加载
Herdinger超过 11 年前
Something tells me I shouldn&#x27;t have done this out of an impulse. I basically hacked it away in 1 hour with one proofread. I felt on fire and wanted to push it out that probably wasn&#x27;t such a good idea.<p>Of course you can represent utf8 in null terminated strings but you have to escape escape the null character, or if used as a terminator implicitly assume it&#x27;s there. The basic jist of that was that I wanted to say, dont use byte encodings internally if you got large registers available and keep attention to null termination and it&#x27;s pitfalls.<p>But justification beside I&#x27;m going to give it more time and reference check against the standard, refrase my intentions so that they are clear and probably shine more light on the positive aspects of the language and put it intro relation with other languages.<p>Hacker News isn&#x27;t a place for pre alpha done in very little time drafts.
评论 #6764512 未加载