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

> Math cannot modify the value of a variable--either global or local. It cannot mutate an element in an array.

Computer scientists do this all the time. You most definitely can model state, side effects, non-determinism, IO, random acts of God etc. using pure math. TLA+, Coq, Isabell/HOL, LEAN etc. are proof assistants that are routinely used to do exactly that.



I'm not sure you're disagreeing?

My interpretation is that he's stating that you can't base fundamental mathematical formalism's on mutation, you have to model them using immutable structures.

You can then model mutation on top of that.

Then in key areas, when you know bringing back in mutation for performance reasons, you can do so with a really nice test case to validate your implementation is correct. IE does the mutable one match the immutable one.

You can also make sure your mutation is local.




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

Search: