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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why is F# code robust and reliable?

101 点作者 b-man8 个月前

10 条评论

AdieuToLogic8 个月前
The short answer - F# and similar languages provide confidence in correctness due to being strongly typed.<p>The long answer - <a href="https:&#x2F;&#x2F;bartoszmilewski.com&#x2F;2014&#x2F;10&#x2F;28&#x2F;category-theory-for-programmers-the-preface&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bartoszmilewski.com&#x2F;2014&#x2F;10&#x2F;28&#x2F;category-theory-for-p...</a>
评论 #41633098 未加载
评论 #41633511 未加载
评论 #41633071 未加载
评论 #41639432 未加载
评论 #41634050 未加载
GiorgioG8 个月前
Also because Microsoft spends relatively little on it and so it’s not changing at a fast pace.
评论 #41633422 未加载
评论 #41641524 未加载
6gvONxR4sf7o8 个月前
Computational expressions [0] seem like a really cool language feature, but i’ve never used f#. Has anyone used them or seen them go well&#x2F;poorly? Also curious what other languages’ alternatives there are, besides just do notation.<p>[0] <a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;fsharp&#x2F;language-reference&#x2F;computation-expressions" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;fsharp&#x2F;language-ref...</a>
评论 #41633627 未加载
AndriyKunitsyn8 个月前
&gt;Strict dependency order<p>&gt;In F#, all variables, functions, types and files can only depend on variables, functions, types and files defined earlier. The benefits of this are the fact that a circular dependency is not possible by default and extra clarity with “what depends on what”, which helps during code analysis and PR reviews<p>Ehm. So it&#x27;s like C... with no forward declarations?
评论 #41633286 未加载
评论 #41642185 未加载
moi23888 个月前
F# is wonderful. And every iteration of C# I see it go more and more in F#’s direction and this makes me incredibly happy.
评论 #41633607 未加载
p4bl08 个月前
Why are algebraic data types called &quot;discriminated unions&quot; here? Is there a subtle difference between the two or is it just that F# calls the same feature differently than OCaml?
评论 #41633317 未加载
chenzhekl8 个月前
Microsoft explained why we love Rust so much ;)
评论 #41633623 未加载
foretop_yardarm8 个月前
If you’re a python user, F# is an excellent next step to making your code safer, easier to maintain and more performant.
评论 #41638402 未加载
xiaodai8 个月前
Haskell, Ocaml, scala<p>anything else?
评论 #41632855 未加载
评论 #41632745 未加载
brikym8 个月前
&gt; No nulls by default ...While many modern languages added some control for doing more null checks to prevent NullReferenceException, F# avoided them from the inception. This means such exceptions are nearly impossible<p>A great feature that Golang couldn&#x27;t get right years later.
评论 #41633388 未加载