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.

Rust Lang in a nutshell

194 pointsby Edouar1over 5 years ago

11 comments

chrismorganover 5 years ago
Skimming through this, there are syntax errors (e.g. → instead of -> and ’ instead of ' in some function signatures), inconsistencies in code style, and a number of content errors (e.g. the content surrounding early return is still quite wrong and suggests a lack of understanding of the actual feature, expression-orientation; and the description of what &str is; and the description of Copy and copy semantics being simplified beyond what I would consider truth). Overall it’s a decent summary and most of the content seems correct, but be careful.
评论 #22182733 未加载
cpascalover 5 years ago
If you are more of an interactive learner I would recommend installing rust on your machine and then cloning the rustlings repo <a href="https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rustlings" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rustlings</a>.<p>Rustlings is an interactive collection of rust exercises that are either incorrect or incomplete. The exercises are grouped into key concepts of rust and cross referenced with relevant chapters in the rust book <a href="https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;" rel="nofollow">https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;</a><p>The general flow is to open up the given chapter of the rust book for a set of exercises and hack away at them until they compile. It&#x27;s a good way to quickly get an introduction to rust and its core features.
评论 #22182901 未加载
Lorkkiover 5 years ago
This seems like a fairly gentle introduction. I will definitely consider it as a starting point for more junior developers interested in touching our Rust code.<p>For those with more experience, Rust By Example walks through the same concepts in a more compact form that also lets you experiment with the code in your browser: <a href="https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;index.html</a>
Karlissover 5 years ago
Example for skipping return keyword in case of early return is just wrong. It can be made to work if you have if x &gt; 0 { x } else { x + 1 } but then it isn&#x27;t early return anymore.
评论 #22179754 未加载
评论 #22179706 未加载
vsnfover 5 years ago
See also, <a href="https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;title-page.html" rel="nofollow">https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;title-page.html</a>
评论 #22179026 未加载
xwowsersxover 5 years ago
I highly, highly recommend this crash course from Michael Snoyman: <a href="https:&#x2F;&#x2F;www.snoyman.com&#x2F;blog&#x2F;2018&#x2F;10&#x2F;introducing-rust-crash-course" rel="nofollow">https:&#x2F;&#x2F;www.snoyman.com&#x2F;blog&#x2F;2018&#x2F;10&#x2F;introducing-rust-crash-...</a>
brianzelipover 5 years ago
Just heard an insightful (for an outsider) podcast episode on Rust with the folks behind much of the resources being shared here in this thread.<p>_An Introduction to Rust featuring Carol Nichols and Jake Goulding_, <a href="https:&#x2F;&#x2F;www.heroku.com&#x2F;podcasts&#x2F;codeish&#x2F;34-an-introduction-to-rust" rel="nofollow">https:&#x2F;&#x2F;www.heroku.com&#x2F;podcasts&#x2F;codeish&#x2F;34-an-introduction-t...</a>
mcjiggerlogover 5 years ago
Looks like it&#x27;s down.<p>Webcache version - <a href="https:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache:SHrbchRsRpQJ:https:&#x2F;&#x2F;www.softax.pl&#x2F;blog&#x2F;rust-lang-in-a-nutshell-1-introduction" rel="nofollow">https:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache:SHrbch...</a>
评论 #22179453 未加载
savolaiover 5 years ago
<p><pre><code> let s1 =&quot;hello world&quot;; let s2 = s1; &#x2F;&#x2F; copied – x1 is still valid let x1 = 2; let x2 = x1; &#x2F;&#x2F; copied – x1 is still valid println!(&quot;{} for the {}nd time!&quot;, s1, x1); </code></pre> Typo in first comment? s1 vs x1?
评论 #22178954 未加载
lordleftover 5 years ago
I&#x27;m increasingly intrigued by Rust. Can anyone recommend a good analysis &#x2F; benchmarking of Rust compared to C&#x2F;C++ code? Curious how it fares on a performance basis.
评论 #22182905 未加载
评论 #22181502 未加载
评论 #22181812 未加载
dantodorover 5 years ago
Err Too many redirects
评论 #22179451 未加载