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.

Two Beautiful Rust Programs

32 pointsby yannikyeoalmost 5 years ago

3 comments

millstonealmost 5 years ago
I think the first example is actually not very compelling for C++ programmers, because it&#x27;s specific to vector. e.g. in C++ this is safe:<p><pre><code> deque&lt;int&gt; xs = {1, 2, 3}; int *x = &amp;xs[0]; xs.push_back(92); cout &lt;&lt; *x; </code></pre> but Rust would still reject this.
评论 #23857570 未加载
评论 #23861069 未加载
评论 #23860794 未加载
doonesburyalmost 5 years ago
Rust pieces should stick to problem and solutions and why rust is a better hammer. C&#x2F;c++ need some competition in the systems space. Drop the sales and marketing puff piece approach
GoblinSlayeralmost 5 years ago
Never understood python programmers&#x27; complaints about punctuation noise in curly brace languages, but looking at rust I feel like I start to understand what they mean.