Questions tagged [object]
The object tag has no usage guidance.
6
questions
60
votes
8
answers
15k
views
How do I prove or disprove "God objects" are wrong?
Problem Summary:
Long story short, I inherited a code base and a development team I am not allowed to replace and the use of God Objects is a big issue. Going forward, I want to have us re-factor ...
85
votes
14
answers
14k
views
Do objects in OOP have to represent an entity?
Does an object have to represent an entity?
By an entity I mean something like a Product, Motor, a ParkingLot etc, a physical, or even a clear-cut non-physical conceptual object -- something that ...
4
votes
3
answers
5k
views
Arrays vs Objects in view template
I am wondering, in view templates, what would contribute to me choosing between using arrays or objects for getting things printed out in arrays
{{$user->zip_code}} vs {{$user['zip_code']}}
I'm ...
4
votes
5
answers
4k
views
Why is there no deterministic object destruction in Java? [duplicate]
I understand and enjoy the benefits of the Garbage Collection in Java. However I don't understand why there is no way in Java to explicitly (and quickly) destroy an object. Surely this could be useful ...
3
votes
1
answer
318
views
Object creation based on type from parallel hierarchy without instanceof (Java)
I have two parallel hierarchies:
B and C implement interface A
D and E extend the abstract class F
I want to be able to do: F f = createObject(A a)
where createObject should follow the behaviour:
...
1
vote
4
answers
671
views
Is collection object better being immutable? [closed]
As per this link, it is an advice that:
A good object should never change his encapsulated state. Remember, an object is a representative of a real-life entity, and this entity should stay the same ...