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.

Unsafe Haskell (2015)

54 pointsby Cieplakalmost 7 years ago

5 comments

justinjlynnalmost 7 years ago
So, essentially the Haskell compiler allows you to say &quot;don&#x27;t worry I&#x27;ve got this, it&#x27;ll be fine -- it&#x27;s pure and semantically correct, I promise!&quot; because the developers of the compiler know that they can&#x27;t think of everything and want you to be able to do some really nasty hacks if you have to do so. It&#x27;s easy to check up that the authors of the libraries you&#x27;re using aren&#x27;t using these escape hatches.<p>Of course, if they or you are using these escape hatches, and it&#x27;s not correct -- and it blows up -- you&#x27;ve only yourself to blame for subverting the compiler.
评论 #17556452 未加载
评论 #17558211 未加载
habituealmost 7 years ago
This is the reason Safe Haskell exists<p><a href="https:&#x2F;&#x2F;downloads.haskell.org&#x2F;~ghc&#x2F;7.8.4&#x2F;docs&#x2F;html&#x2F;users_guide&#x2F;safe-haskell.html" rel="nofollow">https:&#x2F;&#x2F;downloads.haskell.org&#x2F;~ghc&#x2F;7.8.4&#x2F;docs&#x2F;html&#x2F;users_gui...</a>
评论 #17555557 未加载
FrozenVoidalmost 7 years ago
Author calls the unsafe version x7 slower, yet such imperative, impure code wins Haskell benchmarks Perhaps he didn&#x27;t optimize it well? <a href="https:&#x2F;&#x2F;benchmarksgame-team.pages.debian.net&#x2F;benchmarksgame&#x2F;faster&#x2F;haskell.html" rel="nofollow">https:&#x2F;&#x2F;benchmarksgame-team.pages.debian.net&#x2F;benchmarksgame&#x2F;...</a>
saintPirellialmost 7 years ago
Haskell is my guilty pleasure language. I have no idea what I personally would ever use it for, but I admire it so much that learning it is higher up on my bucket list than many other (arguably more useful) things.
评论 #17557705 未加载
jejones3141almost 7 years ago
Is there a point to this other than calling unsafe functions is unsafe?
评论 #17557284 未加载