31 ms·
I won't go so far as state being the entire point, but it's simply another way to programmatically solve a problem. Writing to memory is stateful. Writing to a
by Locke1689 14y ago
I won't go so far as state being the entire point, but it's simply another way to programmatically solve a problem.
Writing to memory is stateful. Writing to a file is stateful. Printing something to the screen is stateful. Seeing the effect of your program is stateful. Would you say that the point of programming is to produce an effect?
- jroseattle 14y agoThat's fine. All your points are perfectly valid, but they have nothing to do with OOP, which is what I was referencing.
- Locke1689 14y agoObjects rely on being mutable. An object-oriented language pushes objects everywhere. This pushes mutation everywhere. This is the opposite of corralled. As I said in another comment: Note that you can have objects without OOP. Python has objects. Python is not object-oriented. Same with OCaml or Racket. I'm not arguing against using state. If you're programming a state machine, you may want to model it with state. That would be a pretty good choice. The problem is that OOP says everything is a state machine.