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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Rust Koans (2015)

255 点作者 wst_大约 6 年前

10 条评论

vngzs大约 6 年前
I remember writing Rust in university a year before this was published. How far the language has come since then! The title should be updated to include the date.<p>The first koan strikes me as a timeless lesson about the advantages of the borrow checker. I came out of it feeling as if I had learned something, though it was really what I knew all along: it was one of the reasons I wrote rust.<p>The second felt tired. Of course OOP limits us to only objects!<p>The third I can see as a larger story about programming. As it applies to Rust? Perhaps it is saying that it is OK to crawl through the crack in the wall between the guards. Or it simply embodies the culture of Rust at the time - one of a massive group of people getting their hands dirty and getting shit done.<p>The fourth truly made me smile. Yes, its lesson about macros was correct - at least then. I doubt they have gotten much easier to use. However, they are useful to work with to get a feel for manipulating the raw syntax of the language. Writing some toys with them is sure to teach you a thing or two about using the language without them.
评论 #19966290 未加载
评论 #19970676 未加载
apo大约 6 年前
<i>Perfection</i> is an interesting one. It states:<p>&gt; “A perfect interface is one which is impossible to use incorrectly, even by accident.”<p>It illustrates the point by showing how a non-expert can build a complex model from well-designed parts without even knowing what the end result should look like.<p>But then later:<p>&gt; &quot;... Even an ugly, rickety shed would be more useful than a hypothetical, flawless pagoda.&quot;<p>Documentation represents the compromise between a perfect interface and shipping pressure. The gap can be minimized but never eliminated.
评论 #19966829 未加载
评论 #19968981 未加载
fooker大约 6 年前
Aren&#x27;t koans supposed to be short?
评论 #19969845 未加载
yay_cloud2大约 6 年前
By the end of the first paragraph, I felt as though I was reading through Anathem again. I have never read any other writing that gave me flashbacks like that to Neal Stephenson&#x27;s style.
评论 #19966188 未加载
cl0ckt0wer大约 6 年前
<a href="http:&#x2F;&#x2F;thecodelesscode.com&#x2F;contents" rel="nofollow">http:&#x2F;&#x2F;thecodelesscode.com&#x2F;contents</a><p>Koans that cover the whole of software development.
isoskeles大约 6 年前
Shoehorning ideas from eastern philosophy into coding... this needs to die. Just talk about best practices or something, stop pretending you&#x27;re a monk when you&#x27;re not.
评论 #19969073 未加载
评论 #20057562 未加载
mkobit大约 6 年前
I thought this was going to be similar to <a href="https:&#x2F;&#x2F;play.kotlinlang.org&#x2F;koans&#x2F;overview" rel="nofollow">https:&#x2F;&#x2F;play.kotlinlang.org&#x2F;koans&#x2F;overview</a> . I used that as a quick way when doing other things to slowly learn parts of the language before diving in, was hoping this would be similar.
评论 #19966449 未加载
评论 #19966186 未加载
D_Alex大约 6 年前
I, of course, understand the &quot;Puom&quot; koan, but I am not sure how to explain it to my friend... can anyone help?
评论 #19968694 未加载
评论 #19968673 未加载
azhenley大约 6 年前
(2015)<p>Anyone care to explain what this is? :)
评论 #19966155 未加载
评论 #19966264 未加载
gridlockd大约 6 年前
I find the portrayal of Rust adherents as members of a religious cult to be unflatteringly appropriate.
评论 #19967163 未加载