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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Tour of Rust

329 点作者 richardanaya将近 5 年前

21 条评论

JulianWasTaken将近 5 年前
Maybe a bit offtopic, but two minor UX issues hit me the first 15 seconds of trying to open this; sharing in case someone who maintains this sees and hears similar minor feedback --<p>First when I saw the splash screen, and saw it say &quot;Press to Continue&quot;, I well first was confused for a split second on &quot;press what?&quot;, then assumed it meant &quot;click&quot;, so I clicked my mouse, then when that didn&#x27;t work assumed it meant &quot;a key&quot; so I hit a random key, then when that didn&#x27;t work, summoned my conscious brain and figured &quot;well I guess it means click specifically on top of this link text&quot;.<p>And then once on the next page, glancing at a long list of languages without really reading the text I said &quot;ok I speak English, guess I should click on that&quot;, only to see the same exact page refresh. &quot;Maybe it&#x27;s broken?&quot;, so I clicked again. When it didn&#x27;t work the second time, again, conscious brain again -- &quot;OK, guess there&#x27;s a next link somewhere here&quot;, and scrolled to the bottom.
评论 #23815271 未加载
评论 #23813682 未加载
swagonomixxx将近 5 年前
I&#x27;m not sure if I&#x27;m the only one that this happens to, but every couple of months I end up re-learning Rust, and because I don&#x27;t really have any use of it in my day to day job (Python and Go, some C++) I end up un-learning it, and then the cycle continues.<p>What kind of projects are a best fit for Rust, for those who are experienced with it? Any recommendations for projects to make Rust stick?<p>Thanks!
评论 #23811807 未加载
评论 #23812593 未加载
评论 #23811217 未加载
评论 #23812579 未加载
评论 #23811065 未加载
评论 #23823494 未加载
评论 #23811765 未加载
评论 #23812060 未加载
评论 #23811283 未加载
tptacek将近 5 年前
This is good, but the string handling stuff should be earlier in the tour, because Rust&#x27;s strings are idiosyncratic (whole blog posts have been written about str vs. String, an issue that doesn&#x27;t appear in most other languages). It&#x27;d be a nit, but handling strings is one of the most important things you usually need to know to be productive.<p>I&#x27;d love a version of this for people who know Rust that was just Rust idioms, similarly explained. I hang out in Slack channel with a bunch of Rust programmers (because I&#x27;m bumbling my way around in Rust as well) and it feels like there&#x27;s a <i>lot</i> of communally understood idioms that aren&#x27;t super apparent from the Rust Book.
评论 #23812710 未加载
评论 #23813542 未加载
seanalltogether将近 5 年前
Every time I try to learn more about Rust, I keep hitting a wall around OOP. I know Rust takes the stance that composition is better then inheritance, but I&#x27;ve never found the examples to be very convincing. How do rust developers deal with complex structs that contain lots of properties and features. For instance, if I need to create &quot;CustomButton&quot; that means I have to implement all the Traits from Button, which maybe requires Traits from LayoutView, which requires Traits from View, etc.... Additionally I need to maintain duplicate properties of those objects in my Custom Button rather then inheriting from a Button struct. It sounds like a headache to maintain.
评论 #23812303 未加载
评论 #23812373 未加载
评论 #23812318 未加载
评论 #23813050 未加载
blondin将近 5 年前
rust doesn&#x27;t look like it has a steep learning curve. not to me at least. the discouraging thing is the &quot;weird&quot; syntax. i feel like rust is the result of diverging ways of looking at things.<p>not saying it&#x27;s a bad. just wish some effort were put into making a consistent syntax.<p>seems weird to me that whoever decided on the function keyword &quot;fn&quot; would write the &quot;Option&quot; type. they would have written &quot;Opt&quot;. but no, it&#x27;s &quot;Option&quot;.<p>consistency is very underrated. and these things just look odd to me but the rust community think it&#x27;s okay, so, oh well...
评论 #23810157 未加载
评论 #23810494 未加载
评论 #23810613 未加载
评论 #23810285 未加载
评论 #23810182 未加载
评论 #23810364 未加载
评论 #23811507 未加载
wdroz将近 5 年前
Unfortunately for me, they don&#x27;t mention macros in this tour of rust. Even after reading the official book, I&#x27;m still not comfortable with macro and macro syntax. Do you have any recommendations?
评论 #23810100 未加载
评论 #23809949 未加载
评论 #23810539 未加载
评论 #23810012 未加载
jasonzemos将近 5 年前
As a skeptic of Rust I really appreciate this. I was very pleased to find the ASM option in the drop-down menu specifically. Coming from C&#x2F;C++ I&#x27;ve found it difficult to understand how and why Rust generates the code that it does. Rust appears slightly less direct in its description of programs than C++ as it&#x27;s shed the hardware-driven abstraction of memory and physical layout. My comfort level with seriously considering Rust for a next project is proportional to my understanding of what it&#x27;s doing under the hood.<p>Thanks! Looks great.
评论 #23812730 未加载
swordbeta将近 5 年前
The playground is rather slow, is it possible to run this locally much like how go&#x27;s tour can?
评论 #23810517 未加载
评论 #23810629 未加载
评论 #23810492 未加载
The_rationalist将近 5 年前
I think this tour of Scala should interest rustaceans as many discover in rust their interest for advanced type system&#x2F;functional features. And Scala in this aspect represent what rust should be in the next decade! <a href="http:&#x2F;&#x2F;dcapwell.github.io&#x2F;scala-tour&#x2F;Partial%20Function.html" rel="nofollow">http:&#x2F;&#x2F;dcapwell.github.io&#x2F;scala-tour&#x2F;Partial%20Function.html</a>
评论 #23812205 未加载
cryptonector将近 5 年前
&gt; With so much difficulty in working with Unicode, Rust offers a way to retrieve a sequence of utf-8 bytes as a vector of characters of type char.<p>&gt; A char is always 4 bytes long (allowing for efficient lookup of individual characters).<p>Please fix this! A 4-byte char is NOT a character but a <i>codepoint</i>.
pen2l将近 5 年前
Sorry, off-topic, but something interesting I just went through: in the first page, where it offers you multiple languages to choose from, one of the options is &quot;Interlingue&quot;. I&#x27;ve never seen it before, I didn&#x27;t realize it was a conlang. Anyway, I used my google-translate addon to select a couple sentences, while having that lang selected... and it gave a comprehensible translation... and recognized original lang as Spanish. I selected the next sentence, it gave a comprehensible English translation, but recognized original lang as Romanian! Another sentence: good output, but French! Another sentence: again, perfectly good translation offered, but input lang recognized as Corsican! Truly a bizarre experience.
vandal_at_your将近 5 年前
Pushing this language and Go as required, responsible, NG languages is another one of the foibles of the cloud&#x2F;web and it&#x27;s owners. For those of us in HPC and scientific compute where is the practical reason to switch from C&#x2F;Python and the unix toolset?
评论 #23812423 未加载
siraben将近 5 年前
Is the naming inspired by Stroustrup&#x27;s &quot;A Tour of C++&quot;? [0]<p>[0] <a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Tour-2nd-Depth-Bjarne-Stroustrup&#x2F;dp&#x2F;0134997832" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Tour-2nd-Depth-Bjarne-Stroustrup&#x2F;dp&#x2F;0...</a>
评论 #23809851 未加载
hn_reader_75将近 5 年前
Off topic. Asking seriously, will there be any point learning some language other than rust in coming days? Will rust be ubiquitous in future?
评论 #23812140 未加载
评论 #23811802 未加载
评论 #23810736 未加载
评论 #23810729 未加载
评论 #23810756 未加载
评论 #23812371 未加载
评论 #23810817 未加载
rimutaka将近 5 年前
I think much of the official &quot;rust-by-example&quot; would benefit from using the rust playground instead of the printed examples.
评论 #23809687 未加载
mendyberger将近 5 年前
This site can actually be used on mobile, cool!
vanderZwan将近 5 年前
&gt; <i>Execution operation failed: Compiler execution took longer than 12000 ms</i><p>Are my privacy add-ons too strict or is the server overloaded at the moment?
评论 #23809776 未加载
评论 #23810740 未加载
评论 #23810594 未加载
philipov将近 5 年前
Did anyone else notice Interlingue in the language options? Maybe we could get a Tour of Rust written in Esperanto :)
评论 #23813584 未加载
bytematic将近 5 年前
Why does the compile debug information get printed to the standard error area?
CubicsRube将近 5 年前
Tour de Rust? No? OK, I&#x27;ll show myself out...
fctorial将近 5 年前
Too bad mr crabs isn&#x27;t the guide.
评论 #23816742 未加载