Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
steveklabnik
on March 17, 2015
|
parent
|
context
|
favorite
| on:
Would Rust have prevented Heartbleed? Another look
Yeah but even Haskell (and I'm assuming Scala has something similar) has unsafePerformIO...
dbaupp
on March 18, 2015
|
next
[–]
The Haskell 2010 standard includes Foreign.Ptr which allows direct, unsafe manipulation of memory:
https://www.haskell.org/onlinereport/haskell2010/haskellch35...
olavk
on March 17, 2015
|
prev
|
next
[–]
As far as I understand, unsafePerformIO is not unsafe in relation to memory safety issues. It is just unsafe in that it circumvents the IO monad, which means order of execution is not guaranteed.
steveklabnik
on March 17, 2015
|
parent
|
next
[–]
It's a different kind of unsafe, but my point is that it violates the normal guarantees of the language.
codygman
on March 17, 2015
|
prev
[–]
But there is a compiler flag -XSafe which could guarantee none of your code uses it, meaning GP's answer could be yes.
steveklabnik
on March 17, 2015
|
parent
[–]
We have that switch in Rust as well.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: