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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

What makes Nim practical?

154 点作者 def-超过 10 年前

16 条评论

BoppreH超过 10 年前
I read the Nim manual a while ago (<a href="http://nim-lang.org/manual.html" rel="nofollow">http:&#x2F;&#x2F;nim-lang.org&#x2F;manual.html</a>), back when it was Nimrod.<p>As a Python user, I loved it. Every single problem I had with Python, Nim seemed to have solved elegantly. Performance, distribution, typing... Everything looked perfect, and none of the Python expressiveness seemed to have been sacrificed.<p>But it was transpiled to C, and the abstraction was leaky. Every once in a while the manual would mention that certain structures were not supported, and it was clear C was the culprit. I think the most glaring example were nested functions, or something similar.<p>I thought to myself &quot;this will bite me in the ass sooner or later&quot; and gave up. Maybe it&#x27;s time to try again. If they plugged the abstraction holes, this will be a killer language, with applications everywhere.
评论 #8935086 未加载
评论 #8935031 未加载
评论 #8934968 未加载
JimmyM超过 10 年前
Great post. I thought I&#x27;d comment just to say about the relative URL ..&#x2F;what-is-special-about-nim not working as intended from the homepage and the link to <a href="http://nim-lang/" rel="nofollow">http:&#x2F;&#x2F;nim-lang&#x2F;</a> which should presumably be <a href="http://nim-lang.org" rel="nofollow">http:&#x2F;&#x2F;nim-lang.org</a><p>Seems a shame to make such a pedantic and insubstantial comment on such an interesting article about a language I&#x27;d not come across, but thought the author might like to know.
评论 #8934819 未加载
jwiley超过 10 年前
Can someone point me to an explanation of &quot;Nim is the only language that leverages automated proof technology to perform a disjoint check for your parallel code&quot;? This is mentioned prominently on the main page...but scanning the docs, the FAQ, Dr. Dobbs, and Googling &#x27;nim disjoint&#x27; didnt lead me to a detailed explanation.
评论 #8938208 未加载
评论 #8938082 未加载
评论 #8937907 未加载
评论 #8938091 未加载
moe超过 10 年前
I love how these new languages compile into a static binary and thereby avoid the deployment nightmares of Ruby&#x2F;Python.<p>More of that please!
评论 #8936659 未加载
评论 #8935647 未加载
评论 #8935234 未加载
iopq超过 10 年前
I just realized something: Nim is like a faster Python or a better Go lang<p>It&#x27;s not really competing in quite the same space as say, D or Rust. It&#x27;s like a statically typed scripting language.
评论 #8935060 未加载
评论 #8934835 未加载
评论 #8937062 未加载
评论 #8934890 未加载
评论 #8937824 未加载
antman超过 10 年前
I tried it and it is easy and fast. But the ecosystem is still not very large. I think that it should support building libriaries directly accessible from python including passing numpy arrays directly to nim. That would make a lot of people to jump right in creating libraries and thus extending its own ecosystem.
评论 #8935989 未加载
joelthelion超过 10 年前
Just add autocompletion and syntax checking for the major editors and people will start adopting it.
评论 #8936468 未加载
towelguy超过 10 年前
I wonder if it can generate bindings for Python like Vala does[0]? That would make it even more interesting for Python developers.<p>[0] <a href="https://github.com/antono/vala-object" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;antono&#x2F;vala-object</a>
评论 #8937073 未加载
namuol超过 10 年前
I perked up as soon as I read this:<p><pre><code> # Table created at compile time const crc32table = createCRCTable()</code></pre>
评论 #8935243 未加载
egeozcan超过 10 年前
I keep coming back to it, and I really like it but wouldn&#x27;t it be great if it had interfaces? I really want to restrict the generic type but there seems to be no way other than using templates[1].<p>[1]: <a href="https://github.com/Araq/Nim/blob/master/lib/pure/collections/lists.nim#L109" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Araq&#x2F;Nim&#x2F;blob&#x2F;master&#x2F;lib&#x2F;pure&#x2F;collections...</a>
评论 #8935261 未加载
Roboprog超过 10 年前
Is there a &quot;ctags &#x2F; etags&quot; utility for nim yet?
评论 #8935556 未加载
honhon超过 10 年前
I played around with Nim and it has huge potential. It is early days and I would like to thank the creators of the language. A decent IDE is the only issue for me. I tried all the IDE options and it was stark. The idetools didn&#x27;t work for me and the unit tests failed on Ubuntu 14.04.<p>At the moment small projects and libraries should be fine but the lack of IDE would be an issue for bigger projects.
xtrumanx超过 10 年前
&gt; That means you end up with a single binary that depends solely on the standard C library, which we can take for granted on any operating system we&#x27;re interested in.<p>What exactly does that mean? Does the end-user of my binaries require a C compiler? Which operating systems are &quot;we&quot; interested in. I&#x27;m interested in Windows and specifically Windows CE.
评论 #8936015 未加载
评论 #8936197 未加载
CyberShadow超过 10 年前
Nim has some good ideas but I can&#x27;t get over the syntax:<p><pre><code> - Significant whitespace, but tabs are forbidden - No block comments, save for `discard &quot;&quot;&quot; ... &quot;&quot;&quot;` - Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar)</code></pre>
评论 #8935342 未加载
评论 #8936140 未加载
评论 #8935383 未加载
评论 #8936528 未加载
towelguy超过 10 年前
&gt; Nim libraries are statically compiled into our binary as well.<p>Does that mean one can not use GPL libraries in non-GPL programs? With other languages you can get around that by linking dinamically.
评论 #8935944 未加载
malkia超过 10 年前
I&#x27;m assuming &quot;staticExec&quot; is not sandboxed in any way...<p>It&#x27;s one thing to make your compile stuck it&#x27;s head while doing #include &quot;aux&quot; in windows, but completely different to treat source code as &quot;shell&quot;-script.<p>(I see the point, and it&#x27;s a great feature, but with too much power).
评论 #8939653 未加载