News for hackers. Stuff that matters.
Re:Why OCaml, why now? (2014) by jonsterling on Saturday February 14, 2015 @07:45PM (#9051353)
1. that's why I qualified it "proper". Of course there is unsafePerformIO, but in the presence of laziness, this is really unsafe. as opposed to ML, where doing IO may harm your ability to reason about stuff, but it won't be unsafe.

Debug.Trace is also unpredictable; actually, it's perfectly predictable if you understand laziness, but it's still not what's really wanted in most cases.

2. ST is a single instance of an effect that can be interpreted into "pure" code. There are plenty of other effects that don't work like this in Haskell, not to mention the problem of composing them together.

So thanks for chiming in! But what you have said is not really that different from what I have said.

Re:Why OCaml, why now? (2014) by tel on Saturday February 14, 2015 @10:16PM (#9051660)
I would love to talk to you a little about these kinds of things. I've been digging more seriously into OCaml the last few weeks and would love some signposts for making the Haskell->OCaml transition.
Re:Why OCaml, why now? (2014) by jonsterling on Saturday February 14, 2015 @11:41PM (#9051796)
Hi! Please feel free to email me at any time. I can't promise that I will know everything you want to know (since I only know very little), but I would be happy to help with what I do know. jon [at] jonmsterling [dot] com.

BTW, I looked at your OCaml stuff yesterday, and it seemed pretty cool.

Re:Why OCaml, why now? (2014) by tome on Monday February 16, 2015 @05:09AM (#9056096)
Could you say something about why `unsafePerformIO` is unsafe in the presence of laziness?

I know `unsafePerformIO` can be used to violate the type system in combination with `IORef`s, for example, but I don't see what laziness has to do with it.

Re:Why OCaml, why now? (2014) by spyder81 on Monday February 16, 2015 @05:18PM (#9059407)
In the presence of laziness, it can be very difficult to reason about what code executes when. When you don't know when your unsafe IO happens, things can get out of order or have other unforeseen side effects.
Re:Why OCaml, why now? (2014) by glaebhoerl on Sunday February 15, 2015 @10:45AM (#9052887)
With regards to 2., could you briefly mention some other instances? I have no idea what I should be thinking of.