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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Idiomatic Rust

22 点作者 astennumero2 个月前

14 条评论

virtualritz2 个月前
The &quot;Effective Rust&quot; book was recently published and can be read online, for free [1].<p>I&#x27;d go as far and say that all of it is, by definition, idiomatic.<p>I guess I&#x27;m saying, you could reasonably change the book&#x27;s title to &quot;Idiomatic Rust&quot;.<p>I&#x27;d read that first and then look into what bits it doesn&#x27;t cover. That could be worth a blog like the one this is about.<p>[1] <a href="https:&#x2F;&#x2F;www.lurklurk.org&#x2F;effective-rust&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.lurklurk.org&#x2F;effective-rust&#x2F;</a>
评论 #43443391 未加载
wegfawefgawefg2 个月前
only one part. applies to zero of the rust code i write. formats horrendously on mobile.<p>you gotta work on this more before putting it on hacker news
评论 #43421055 未加载
评论 #43443394 未加载
amalive2 个月前
Don&#x27;t be let down by other comments. The topic itself something I think people would more enjoy when it is more comprehensive. Add more content with your findings, refine and then post again on HN
评论 #43443396 未加载
评论 #43421400 未加载
tyilo2 个月前
&gt; Idiomatic Rust<p>Not very idiomatic to not use the builtin code formatter...
评论 #43443411 未加载
评论 #43421397 未加载
keyle2 个月前
Personally, I&#x27;d prefer to see a table of content and jump through it than being taken through it like a little story.<p>Is there anything more than part 1?
评论 #43443419 未加载
评论 #43421111 未加载
astennumero2 个月前
Hello HN,<p>I&#x27;ve recently started learning Rust, and I&#x27;m finding it incredibly interesting! However, I&#x27;m also encountering a wealth of new syntax, built-in functions, and concepts that are unique to Rust. To solidify my understanding and create a useful resource for myself (and hopefully others), I&#x27;ve been diligently documenting these discoveries.<p>I&#x27;ve decided to share these insights by starting a blog, where I&#x27;ll delve into the idiomatic Rust behaviors I&#x27;m learning. I&#x27;ve already compiled a substantial collection of examples and plan to discuss them in detail. My goal is to maintain a regular posting schedule, reflecting my ongoing learning journey.<p>I&#x27;d love to hear your thoughts on this project. Additionally, I&#x27;m eager to learn about your favorite idiomatic Rust patterns. If you have any specific behaviors or concepts you&#x27;d like to see covered in my blog, please share them! Thanks in advance for your feedback and suggestions.
评论 #43420971 未加载
评论 #43420906 未加载
astennumero2 个月前
Thank you everyone for your feedback. Part 2 is now available here: <a href="https:&#x2F;&#x2F;a-i-nstein.neocities.org&#x2F;pages&#x2F;part-2" rel="nofollow">https:&#x2F;&#x2F;a-i-nstein.neocities.org&#x2F;pages&#x2F;part-2</a>.<p>I&#x27;ve addressed the mobile viewing issue. I&#x27;ll also be working on adding a Table of Contents.<p>As I&#x27;m new to Rust and unfamiliar with unconventional programming paradigms, I understand that some of the concepts I&#x27;m exploring may not be idiomatic for experienced programmers. My hope is that this series offers something new to everyone, and I&#x27;d be happy if it introduces even just one new concept to someone. That would be my contribution to the community.
评论 #43444775 未加载
Hamuko2 个月前
Is x = 57u8 actually idiomatic when compared to x: u8 = 57? I don&#x27;t remember any Rust resource using that.
评论 #43421255 未加载
评论 #43421268 未加载
评论 #43421209 未加载
AbuAssar2 个月前
very low effort, I expected more high quality content from HN front page
评论 #43421140 未加载
asimpletune2 个月前
Hey I enjoyed reading part 1. Would you add a media query though to the left and right margins? It’s impossible to read vertically on mobile.
评论 #43443458 未加载
jbhn2 个月前
Please do Strings next. Effective Rust isn&#x27;t useful at guiding to a good default.<p>The technical arguments for one or the other option are available in a bunch of places, but no good guidance on an idiomatic default.
评论 #43425193 未加载
评论 #43443465 未加载
sshine2 个月前
How it renders on mobile:<p><pre><code> Rust simplifies numerical variable initialization by allowing type annotation directly within the value assignment.</code></pre>
评论 #43443466 未加载
ForTheKidz2 个月前
Page is mostly margin on safari mobile fyi
评论 #43421005 未加载
astennumero2 个月前
Also can someone explain what the [flagged] in the title means?