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.

The Promise of Rust

31 pointsby 0xedbabout 1 month ago

6 comments

CRConradabout 1 month ago
After a promising start, it says:<p><i>&quot;The rest of this article is exclusive!<p>This article will unlock in 6 months&quot;</i><p>Hovering over the &quot;6 months&quot; bit displays a hint, <i>&quot;Monday, 13 October 2025 at 23:30:00&quot;.</i> (ETA: though it doesn&#x27;t say in which timezone.)<p>.<p>As for the bit of content we are allowed to see, it certainly didn&#x27;t sell me on Rust... but sure confirmed my resolution to avoid JavaScript at all cost.
评论 #43714735 未加载
kretaceousabout 1 month ago
Not the point of the article but just two cents about the JS part:<p>- While not part of the ECMAScript spec, there is a Web API called structuredClone for deep copying objects. It&#x27;s implemented in major runtimes like Node (17+), Bun and Deno. <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Window&#x2F;structuredClone" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Window&#x2F;stru...</a><p>- I&#x27;ve found a total of one use case for Object.freeze until today. Since exported modules are live bindings and are mutable, exporting a global object which is not intended to change during the runtime (e.g. an application wide config) is a bad idea. Exporting the object after wrapping it in Object.freeze can help avoid unnecessary mutations to it.
rererereferredabout 1 month ago
Not sure if the article mentions this later but JS has structuredClone now which should be better than the stringify&#x2F;parse dance in the example: <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Window&#x2F;structuredClone" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Window&#x2F;stru...</a>
7bitabout 1 month ago
&gt; &#x2F;&#x2F; note: taking `&amp;String` is needlessly restrictive, but one thing at a time<p>Why? Even the video doesn&#x27;t explain it, but I feel that&#x27;s quite important to the article&#x2F;video.
评论 #43730016 未加载
评论 #43728360 未加载
poulpy123about 1 month ago
I confess to feel weird at the idea to need a copy to print something twice
评论 #43717362 未加载
评论 #43725403 未加载
n8henrieabout 1 month ago
<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41770479">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41770479</a> &gt; Re paywalls: if there&#x27;s a workaround, it&#x27;s ok. ...<p>&gt; The converse is also true: if there&#x27;s not a workaround, it&#x27;s not ok.