Exactly, this is why unsafePerformIO is unsafe. Escaping IO isn't if you know what you doing but it's unpredictable.
-
-
In order to break RF, unsafePerformIO needs to be observe aka, the result must be needed.
2 replies 0 retweets 0 likes -
Sure but the determined dev can force that, GHC providing escape hatches, etc. Point being we also rely on conventions & best practices.
2 replies 0 retweets 0 likes -
I'm not disagreeing that Haskell is much better at this btw. I just think that IO/Task has value in Scala, I personally like it a lot
1 reply 0 retweets 1 like -
I don't try to compare both. I wrote almost Haskell and Scala for a decade. I prefer Scala to not do the same mistakes Haskell did.
1 reply 0 retweets 1 like -
What languages do you use now professionally? Would you prefer a codebase that didn't try to track effects in Scala (ala scalaz.c.Task)?
1 reply 0 retweets 0 likes -
Professionally and on my side projects I use Haskell. I want effect tracking. It's just you have to use monad transformers to compose stuff
1 reply 0 retweets 0 likes -
Things get ugly pretty quick. Plus, stacking monad transformers ain't cheap. You end up rolling your own most of the time
2 replies 0 retweets 0 likes -
With all respect, I think you are wrong.
1 reply 0 retweets 0 likes -
Considering my stand on this is subjective. I don't mind. I'm aware I chose comfort over correctness. Scala is ugly enough.
1 reply 0 retweets 0 likes
But your reasoning is wrong. It's not trading anything. It's throwing away, for no benefit.
-
-
Ah I see, I agree with you. But instead of pretending people will follow guidelines I rather use a language that makes it mandatory
1 reply 0 retweets 0 likes -
That's why I rather write my code in Haskell instead of having half assed effect tracking in Scala
1 reply 0 retweets 1 like - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.