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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Comparing OCaml and Standard ML

103 点作者 carloscm超过 10 年前

8 条评论

sgeisenh超过 10 年前
Purity is almost used in a pejorative sense throughout the page.<p>If it wasn&#x27;t for poor library support, I would prefer using SML to OCaml. SML is syntactically simpler and both SML&#x2F;NJ and MLton have a lot to offer that I haven&#x27;t yet found with OCaml.<p>I think one of the biggest mistakes in the life cycle of SML was premature specification. As a result of the language definition, SML has stagnated for almost 20 years. There is now some notion of &quot;Successor ML&quot; (see: <a href="http://sml-family.org/" rel="nofollow">http:&#x2F;&#x2F;sml-family.org&#x2F;</a>), but I honestly don&#x27;t see it catching on outside of an academic space.<p>As an academic language, SML is great. It is a great tool for learning functional programming since the learning curve isn&#x27;t especially steep. It is easy to reason about performance since evaluation order is explicit. And immutability is the default but with mutable types that are easy to use.
评论 #8498400 未加载
评论 #8499091 未加载
评论 #8499795 未加载
评论 #8497415 未加载
评论 #8500299 未加载
a0超过 10 年前
ML&#x27;s syntax is indeed less confusing than OCaml&#x27;s. And that&#x27;s the reason I&#x27;m working on a compiler front-end replacement for OCaml inspired by Clojure, Haskell, Ruby and Julia. It will be for OCaml what Elixir is for Erlang. I&#x27;m finishing the parser right now and will next implement the language primitives as a library in the language itself.
评论 #8497729 未加载
评论 #8497632 未加载
p4bl0超过 10 年前
Small update: recent versions of OCaml have immutable strings too.<p>It also miss mention of package manager (OCaml has Opam, which is awesome, I don&#x27;t know about SML).<p>And ocamlbuild is missing from the build tools section.
评论 #8497512 未加载
评论 #8498111 未加载
CmonDev超过 10 年前
Wow, ML syntax is actually better than OCaml. It&#x27;s a shame the former was used as a base for F#.
评论 #8497758 未加载
评论 #8499932 未加载
评论 #8497653 未加载
gnud超过 10 年前
I really enjoy working with SML (I&#x27;ve used sml&#x2F;nj and parrotml) - and would love to use it for &quot;real&quot; projects, but until it actually has decent unicode support, there&#x27;s just no way I can.
zvrba超过 10 年前
Ocaml: the practical and the ugly one. (I hate Ocaml&#x27;s syntax mainly due to the noise of let ... in clauses)
Altenuvian超过 10 年前
including mythryl, a sml&#x2F;nj derivative with c-flavored syntax to the comparison would be interesting. see <a href="http://mythryl.org/" rel="nofollow">http:&#x2F;&#x2F;mythryl.org&#x2F;</a> for further info.
评论 #8502726 未加载
agumonkey超过 10 年前
Sml syntax is indeed very nice, and emacs sml-mode is pretty strong too. A great joy to use, almost as good as paredit.