Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>I want it to stop me from modifying the code later so that it accidentally becomes vulnerable to interactions that I’m not fully controlling. I want it to provide me with tools to specify how potential interactions should be handled, in a way that is systematic and robust but otherwise as simple as possible, and that can be applied at whatever level of my design makes the most sense.

That's...the state monad. The compiler tells you when you try to access it in a way that is not allowed.

You have to be explicit with sharing.



That's...the state monad. The compiler tells you when you try to access it in a way that is not allowed.

But the price for that is that I always have to access it in a cumbersome way, even when being so explicit makes no useful difference to the correctness of my code.

You have to be explicit with sharing.

I don’t want to be explicit with sharing.

I want to be explicit with sharing when it matters, and otherwise not to worry about it, safe in the knowledge that the language will warn me if I try to do something later that invalidates any assumptions I’m making now.


If your argument is that it's better to be explicit with sharing, then why would you want to use threads that implicitly share 'total'?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: