> Somewhere in the entire game pipeline there are mutations happening at 60 FPS, and pure FP languages hide this from you by "cheating" while other languages make this fact explicit.
This is incorrect on multiple levels.
1. You don't need to perform mutations at all. You can have a recursive loop w/only immutable state. I suppose the compiler ends up mutating some memory due to TCE, but that's a principled transformation and not "cheating" or bad in any way compared to writing the code mutably up front.
2. When you do use it, mutation is _always_ very explicit in Haskell and Idris. It is _more_ explicit than other languages! You can' tell if a Go function modifies its inputs or some global state without reading its definition. You can with Haskell :)
I'm very sorry but you are actually incorrect on every level.
>1. You don't need to perform mutations at all. You can have a recursive loop w/only immutable state. I suppose the compiler ends up mutating some memory due to TCE, but that's a principled transformation and not "cheating" or bad in any way compared to writing the code mutably up front.
Suppose? The GC must delete unused values or there will be a memory overflow. This is cheating behind a blackbox. The minute you start using those "immuteable values" the cheat is revealed via leaky abstraction.
>2. When you do use it, mutation is _always_ very explicit in Haskell and Idris. It is _more_ explicit than other languages! You can' tell if a Go function modifies its inputs or some global state without reading its definition. You can with Haskell :)
In haskell and Idris, you cannot do mutation period. So your statement is categorically wrong. When haskell or Idris "does mutation" it must feed it into an abstraction outside of the core language, aka cheating. This is what you mean by "very explicit"
This is incorrect on multiple levels.
1. You don't need to perform mutations at all. You can have a recursive loop w/only immutable state. I suppose the compiler ends up mutating some memory due to TCE, but that's a principled transformation and not "cheating" or bad in any way compared to writing the code mutably up front.
2. When you do use it, mutation is _always_ very explicit in Haskell and Idris. It is _more_ explicit than other languages! You can' tell if a Go function modifies its inputs or some global state without reading its definition. You can with Haskell :)