TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Working with strings in Rust (2020)

38 pointsby tigerlilyover 2 years ago

4 comments

edflsafoiewqover 2 years ago
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 未加载
alkonautover 2 years ago
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_over 2 years ago
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 未加载
phkahlerover 2 years ago
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 未加载