Re: Object identity



We agree that it can be treated in both ways. But as an object-type,
according to your rule, there must be a 1-1 mapping between instances
and entities (in some scope). That forces a design to only allow at
most one instance to represent a given date value. That is rather
difficult to enforce in practise. That would be like ensuring there
is only one representation of the integer 0 in a given scope. In a
pure OO language like small talk you are going to have some pain!
Would you be happy to simply compare pointers to date objects and
assume different pointer values imply different date values? If a user
enters a date, how are you going to ensure there isn't another Date
object in the model with the same value, breaking your rule? What
horrible impact is this going to have on the schema?

I don't see the dificulty of implementing that (in Java at least... probably
in Smalltalk will be the same): One can hide the constructors and provide a
factory method to create the object based on the values, if a object with
that values is already instantianted, I can return it instead of creating a
new one... so you can have a 1 to 1 mapping between values and instance by
design.
On the other hand, in Java Strings behave that way: in a JVM, there's only
one instance of each string used.
I'm still confused about the point you're trying to make, but I believe that
more mathematical formalism will not solve the essential problem of software
construction.
According to Frederick P. Brooks's "No silver bullet" the essential problem
of software construction is: based on the problem to be solved, you need to
create conceptual constructs and represent those construcs in a language.
It's almost 20 years ago, but I think is still applicable.
OO helps because it makes easier the transition from the problem to the
conceptual construct (is the OOAD solution) and from the conceptual
construct to the language (OOPL program).
Even more, I believe that translation automates the last step (OOAD ->
OOPL), but still the main problem is going form the problem to the
conceptual solution.

Regards
Gabriel Claramunt


.



Relevant Pages

  • Re: Object identity
    ... BTW although SmallTalk is a pure OO language (everything is an object - ... every string in the JVM is represented only once. ... of software construction is: based on the problem to be solved, ... create conceptual constructs and represent those construcs in a language. ...
    (comp.object)
  • Re: OT Vermonts Radioactive Nightmare
    ... Their consumers bore the risk and paid the capital cost. ... Reprocess a lot of the current waste fuel in this country and the ... operating in the US is running a design that is almost 40 years old. ... There have been no new construction starts since ...
    (rec.crafts.metalworking)
  • Re: 3vl 2vl and NULL
    ... a 5 floor building, the air-con guys were ducting the 3rd floor when ... part of the structural design to allow construction of another 5 floors ... overall design and consulting widely. ... integrity. ...
    (comp.databases.theory)
  • Re: Dynamic "One-time-pad"
    ... > a single character in the cipher array. ... Why should I use your construction over AES, ... If you really believe in the security of your design you'd do well to ...
    (sci.crypt)
  • Re: A website or wiki on language design
    ... As long as it's about programming language design (and legal, ... Many of the under construction ... if we can all edit, we can summarize what's already there, contribute ... The C2 wiki is growing on me. ...
    (comp.lang.misc)