Hacker News new | past | comments | ask | show | jobs | submit login

Thank you for the insight. What you're describing reminds me pretty strongly of pure functions. Which I guess makes sense, since "Functional languages can do concurrency out of the box!!" (well yeah, but you need to learn how to write truly functional code first :D)

>"80% of the class didn't understand it, and the remaining 20% of the class thought that manual synchronization was not a problem"

Unfortunately it seems to be this way with many things in our field (/life?). And the 80% non-understanders group doesn't even stay the same people for every topic! :)




Pure functional programs work because what kills you isn't shared state, but mutable shared state, and if you have no mutation, then you have not mutable shared state.

Unix processes work on the opposite side: you can mutate everything, but very little is shared.

With threading and impure code you need to not mutate shared things, and limiting yourself to message-passing is a good way to achieve this (of course you can't message-pass shared pointers or you've missed the point).




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

Search: