TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Of Course ML Has Monads

44 pointsby ottbotabout 14 years ago

3 comments

Peakerabout 14 years ago
&#62; The default basis library does not attempt to segregate effects into a monad, but it is perfectly straightforward to do this yourself, by providing your own layer over the standard basis<p>This comment is somewhat silly. The whole notion of segregating effects is about what a programmer <i>cannot</i> do, and not about what they can.<p>In ML, maybe <i>you</i> can segregate effects, but it is of limited value, as all of the code you use <i>might</i> be hiding procedural effects behind the seemingly innocent types.<p>In Haskell, when I read an API, I <i>know</i> no effects lurk behind the pure type signatures.
评论 #2504744 未加载
评论 #2504285 未加载
评论 #2504301 未加载
评论 #2504152 未加载
abecedariusabout 14 years ago
You could analogously explain how of course Lisp has types, you just implement Hindley-Milner and slot it in in front of the standard library. Only, if the author wrote <i>that</i>, I'd think I was hallucinating.
colandermanabout 14 years ago
Also of note, a syntax extension for OCaml adding do-notation to the language: <a href="http://www.cas.mcmaster.ca/~carette/pa_monad/" rel="nofollow">http://www.cas.mcmaster.ca/~carette/pa_monad/</a>