Home » U++ Library support » U++ Core » does U++ use Smalltalk(Java) approach? [SOLVED] -No.
does U++ use Smalltalk(Java) approach? [SOLVED] -No. [message #395] |
Mon, 12 December 2005 14:21 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
Hi, I'm writing my article...
So, to be sure I want your confirmation and/or comments:
1. "U++ does not use Smalltalk(Java) approach - where everything derived from a single inheritance tree and at the root of the tree is a class called Object – the same class that each Smalltalk(Java) container holds, because...[I want your comments here]"
2. what are the differences then between U++'s Value and Java's Object?
[Updated on: Mon, 01 May 2006 09:50] Report message to a moderator
|
|
|
Re: does U++ use Smalltalk(Java) approach? [message #396 is a reply to message #395] |
Mon, 12 December 2005 14:50 |
|
mirek
Messages: 13979 Registered: November 2005
|
Ultimate Member |
|
|
1.: Yes. Smalltalk model is unsuitable for C++. For C++ it is better to have unrelated ("decoupled") classes and class hierarchies and glue them together using templates (usually containers).
2.: Value is intended just for storing 'values'. Now it is a little bit hard to explain what exactly 'value' is, and at the same time it is very important for U++ programming style.... (there is quite a lot of effort put into dealing with various types of objects - values, pick values, non-copyable objects - non-values etc...)
Perhaps better is to provide some examples: number is a Value, date is a Value, String is a Value, etc...
Maybe a right descrition is that "for value, object identity does not matter, just its content (well, ehm, its value ).
I wish I could explain that more....
Not also that Value supports some value-like operations, like comparing values (by their, well, uhm, values...) converting similar types of values (you can assign 'int' to the Value and then assign this value to 'double', same for Date / Time etc.).
|
|
|
Goto Forum:
Current Time: Mon May 13 09:56:29 CEST 2024
Total time taken to generate the page: 0.01617 seconds
|