4 ms·
Can we not just summarise this whole thing with the words: Shared state should be avoided, if possible and pragmatic. Now go do this in whatever language you w
by Quarrelsome 17y ago
Can we not just summarise this whole thing with the words:
Shared state should be avoided, if possible and pragmatic.
Now go do this in whatever language you wish.
- Psyonic 17y agoNo, because its not just about you. How can I as a developer know if a function I'm calling in C uses more than its inputs? That's the real issue.
- vidarh 17y agoExcept it hardly ever is an issue. I can't remember last time I came across a situation in any of the languages I use that support global variables where some function depended on some global variable without the docs making a huge fuss about it. It was certainly many years ago.
- cemerick 17y agoNone of this has to do with globals -- the key issue is accessibility of shared mutable state from within imperative functions. That is an inescapable constant outside of FP environments.
- cemerick 17y agoNo, because what language and environment you choose impacts your ability / likelihood of actually doing that.
- Quarrelsome 17y agoSorry, I meant mutable state.