4 ms·
> Passing around state via variables is no more tedious But it is - the programming language is now repeatedly quizzing you on something you've already told it
by optimiz3 6y ago
> Passing around state via variables is no more tedious
But it is - the programming language is now repeatedly quizzing you on something you've already told it.
- panopticon 6y agoThat depends on the language. Haskell provides some nice syntax here with monads.
- crimsonalucard1 6y agoWell I mean would you rather have this: method(state){ return doSomething(state) } Or this: class A: otherThingThatMutatesState1() otherThingThatMutatesState2() otherThingThatMutatesState3() method(){ this.state += 1 // or some other mutation }