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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Working with strings in Rust (2020)

38 点作者 tigerlily超过 2 年前

4 条评论

edflsafoiewq超过 2 年前
I found the writing style, the presentation as a &quot;naive beginner&quot; discovering facts about programming by writing test programs, to be insufferable. Eg<p>&gt; Okay, so, argv is an array of addresses, and at those addresses, there is.. string data. Something like that:<p>&gt; It looks like every argument is terminated by the value 0. Indeed, C has null-terminated strings.<p>&gt; If I&#x27;m, uh, reading this correctly, &quot;é&quot; is not a char, it&#x27;s actually two chars in a trenchcoat. That seems... strange.<p>The inclusion of all the &quot;naive test programs&quot; serves no purpose but to inflate the article&#x27;s length to ridiculous levels.
评论 #32952426 未加载
评论 #32952518 未加载
alkonaut超过 2 年前
I find this tyle of writing fantastic. The author pretending to realize shows exactly when there is a realization to be had. Examples and counterexamples, problems and their resolution. I have read a number of these and they are all brilliant I think. The length density and &quot;rythm&quot; is just right.
astrobe_超过 2 年前
Half of the article is <i>below</i> the level of &#x2F;r&#x2F;coding as far as C goes, only to boast for the billionth time about how safer Rust is.
评论 #32950946 未加载
评论 #32950717 未加载
评论 #32951632 未加载
评论 #32950676 未加载
phkahler超过 2 年前
This is FAR too long. The first 10 pages is all about C strings. Just get to the point of why Rust has these 2 types and give people a link to a piece on unicode and UTF8 if that background is going to help. I didn&#x27;t even get to the Rust part before giving up. I then scanned it, found a little Rust stuff but still couldn&#x27;t easily pick out the answer to the top-level question. Now I don&#x27;t care.
评论 #32951947 未加载
评论 #32951772 未加载