There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
No.Rich Mai wrote:Is this possible in current vsns of Java? . . .
Campbell Ritchie wrote:
If an invoice has a serial number, then that serial number would be a field of the Invoice object. That would be the object‑oriented way to do it. This is a naïve implementation:-
...
I can see all sorts of problems with that approach, but don't think any of those problems is insoluble:-
.....
Bear Bibeault wrote:Consider:
so if the were possible to get the variable name given an object, what would be the result? There are two references to the same object. There can be as many as memory allows.
That's why this isn't even a concept.
...
If the object are to get associated to a relational database table, the id field makes a natural primary key.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |