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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Is Nim unsafe?

47 点作者 Pharohbot将近 10 年前

5 条评论

gjm11将近 10 年前
The same FAQ has a question &quot;Why is it case&#x2F;style insensitive?&quot; and an answer giving four reasons, <i>none</i> of which supports &quot;style insensitivity&quot; in any way.<p>&quot;Style insensitivity&quot; means that in Nim the following identifiers are treated as equivalent: nOpenFiles, no_pen_files, Nope_NFiles. Insertion and removal of underscores, as well as case, is ignored. I hope you weren&#x27;t expecting to find anything in your codebase using grep.<p>It seems a reasonable guess that, oh, maybe 99% of people wondering why Nim is &quot;case&#x2F;style insensitive&quot; are more worried about &quot;style insensitivity&quot; than about mere &quot;case insensitivity&quot;. (The other 1% haven&#x27;t yet learned that Nim is &quot;style insensitive&quot;.)
评论 #9668708 未加载
评论 #9668736 未加载
评论 #9669890 未加载
评论 #9669700 未加载
overgard将近 10 年前
&gt; It&#x27;s not hard to &quot;fix&quot; this issue anyway. Where &quot;fixing&quot; means &quot;pretending Nim created Ansi C code in the first place&quot; (which it doesn&#x27;t).<p>They should probably fix the wording of this -- as an outsider I can&#x27;t really parse the message conveyed here. If it doesn&#x27;t create C code then why does the comparison matter? Or is it just about the &quot;ansi&quot; part? But then why does that matter?)
PopeOfNope将近 10 年前
When I read between the lines, this section says to me: &quot;Yes, Nim is unsafe, but there are features on the way to help it be more safe.&quot;<p>&#x27;not nil&#x27; sounds like a great addition to the language, but what if you wanted that to be the default behavior without having to pepper it throughout every variable in your codebase?
评论 #9671018 未加载
pyre将近 10 年前
&gt; Is Nim unsafe?<p>Are the binaries hosted on SourceForge?
Dewie3将近 10 年前
Good old null pointer.