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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

I enjoy using the Nim programming language at Reddit

91 点作者 Guzba超过 2 年前

5 条评论

birdfood超过 2 年前
It&#x27;s cool to read that treeform is using Nim at reddit (and helps explain why he&#x27;s so prolific!). I see the same question sometimes asked &quot;what is Nim&#x27;s killer feature&quot;, &quot;what is Nim better at than other languages&quot; and the answer given is usually &quot;there is no killer feature, Nim is great at lots of stuff!&quot;. But I would argue Nim&#x27;s killer feature is pragmatism. I think it&#x27;s the most pragmatic language I&#x27;ve come across.<p>I love that I feel like I&#x27;m writing a cross between a dynamic scripting language and a functional language, but that nothing is off limits. I can still dive into memory management if I want to, yet I&#x27;m not forced to deal with a cliff of complexity up front. I&#x27;d be happy to choose Nim for command line tools, server code, or games and I can&#x27;t think of another language where this is the case for me.<p>I&#x27;ve started writing some small internal tools in Nim for work. The language is approachable for other devs who &quot;aren&#x27;t into languages&quot; to pick up if needed, but I can also share binaries with them so they can just use the tools without needing to set up an env.
评论 #33610981 未加载
poulpy123超过 2 年前
What really seems to characterize Nim is its ability to be used as glue language between different codes. C&#x2F;C++&#x2F;objective-c&#x2F;javascript interoperability is native, python interoperability seems to be pretty good. It makes me think a lot to python before it exploded in popularity with machine learning and education
评论 #33603650 未加载
评论 #33604397 未加载
planetis超过 2 年前
Great read, totally agree on the last point. Hope Nim gains more traction.
michal_f超过 2 年前
Nim is interresting. Its easy to read (and write) about pros. But what are cons?
评论 #33601823 未加载
评论 #33603271 未加载
rlipsc超过 2 年前
It&#x27;s great to hear Nim in production stories!<p>&gt; I feel like Nim made me fall in love with programming again.<p>Same. It&#x27;s just so <i>frictionless and productive</i>, and you know your code will run on basically any platform in a nice, efficient, self contained executable.<p>For me it&#x27;s a language of sensible defaults. Speed and safety first, and opt-in machine level control. Want to target that obscure microcontroller? No worries: <a href="https:&#x2F;&#x2F;github.com&#x2F;PMunch&#x2F;ratel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PMunch&#x2F;ratel</a>.<p>Want to use Unreal? Sure: <a href="https:&#x2F;&#x2F;github.com&#x2F;jmgomez&#x2F;NimForUE" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jmgomez&#x2F;NimForUE</a>.<p>Want to target the web? Native React support with <a href="https:&#x2F;&#x2F;github.com&#x2F;andreaferretti&#x2F;react.nim" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andreaferretti&#x2F;react.nim</a> or web apps with <a href="https:&#x2F;&#x2F;github.com&#x2F;karaxnim&#x2F;karax" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;karaxnim&#x2F;karax</a>.<p>The list goes on! <a href="https:&#x2F;&#x2F;github.com&#x2F;nim-lang&#x2F;Nim&#x2F;wiki&#x2F;Curated-Packages" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nim-lang&#x2F;Nim&#x2F;wiki&#x2F;Curated-Packages</a><p>But, what if you want to use that battle tested C++ library? Nim can compile to C++ so you have native ABI FFI!<p>There&#x27;s also a lot to be said for automation with AST macros. The language is built around them, they&#x27;re not just a tacked on after thought. As a result, it&#x27;s very easy to do everything from removing boilerplate copy pasta errors to creating mini languages or even generating APIs from data. This can give you new paradigms in approaching solutions for things that are quite painful in other languages.<p>I feel like this language could be a weapon of mass production for many businesses once they dip their toes in!
评论 #33603995 未加载