In the real world, everything is a process. Nothing ever stays the same or stands still. No object is the same object from one millisecond to the next.
Immutable state isn't just a formal exercise--it's a more authentic model of the world.
In the real world, everything is a process. Nothing ever stays the same or stands still. No object is the same object from one millisecond to the next.
Immutable state isn't just a formal exercise--it's a more authentic model of the world.
To me that's as bad as saying "everything is an object".
I'd rather try and understand where each approach is best rather than picking a single approach and dogmatically applying it in every scenario.
Been reading up on Heraclitus lately?
While this is an interesting statement for a philosophical dialogue, it doesn't really make much sense in the context of programming, where many things are constant, many things are not processes, and there are plenty of use cases for both mutable and immutable state (which is exactly why I always get really defensive reading articles like this one, that pretend all problem domains would be best modelled by a single programming language/paradigm/model of computation).
Now it turns out to be difficult to maintain synchronized clocks, and Lamport timestamps and vector clocks are alternatives. The end result looks similar to a relativistic situation, but (and I'm not a physicist), it seems wrong to claim this situation is because of Special Relativity.
Thoughts?
In practice, replace Special Relativity with Network Problems.
http://ocw.mit.edu/courses/electrical-engineering-and-comput...
This is important, and something almost everybody ignores.
Get an OO codebase, and try to implement a time-dependent feature, like snapshots, or even a simple undo. The abstractions fall apart.
Surely that is in part due to the developer. Poor developers will choose the wrong abstractions, and have a poor OOP model as a result. Better developers will choose the correct abstractions, and have better models. Obviously the domain you are modeling will make it easier or harder to model things, and in some cases OPP may not be a good choice at all.
In my day to day work I use Django. I start with a data model - based on an ER diagram. I code that in the Django model classes. Is that OOP modeling or ER modeling? I don't know. I don't really care too much. It works fairly well for most things I am doing.
If space-time is discontinuous, then we can think any change of state, like motion, as a set of discrete changes. If we think the motion of a particle from one energy bin to another is immediate (meaning the particle cannot be found on the border between the bins, or one moment the particle is in Bin A, next it is in Bin B) then we can think the particle was destroyed in Bin A and another one was created at Bin B. And this is what we call motion from A -> B.
I bet the authorities around the world don't like your time-inclusive-dimenstion view much.
No matter what you do, identity does not change. You commiting a crime yesterday was an event that included you as an object with identity and today you have the same identtiy so you are clearly responsible for what you did yesterday.
GUARDS! :P