[exprla-devel] RE: [XPL] The structure of classes in XPL
Status: Pre-Alpha
Brought to you by:
xpl2
From: reid_spencer <ras...@re...> - 2002-01-31 08:59:39
|
--- In xpl-dev@y..., "Richard Anthony Hein" <935551@i...> wrote: Could a form of overloading address this problem? Like in a Java class, there may be multiple functions in the class that do different things depending on the type of parameter (one may be a string, another may be an integer), but the overall function result is the same. So if you use overloading, you call <human>, <mathematician>, and <programmer> as if they were different functions in the class? Richard A. Hein -----Original Message----- From: Alexander E. Gutman [mailto:gutman@m...] Sent: June 11, 2000 10:15 AM To: xpl@e... Subject: [XPL] The structure of classes in XPL At this moment, I am thinking about how classes will be declared in XPL. And I encountered a problem. As soon as XPL is closely related to XML, the structure of its classes should be as flexible as XML structures. Should we regard classes as XML element types (and, probably, declare them via schema element type definitions) or should we employ a standard approach of some kind? Consider me as an example of an XPL object. First of all, I am a human. As a human, I have a name (Alexander Gutman) and birthdate (01.07.1966). On the other hand, I am a mathematician. As a mathematician, I have a name (Alex Goodman) and workplace (Blahblah Institute). Furthermore, I am also a programmer. As a programmer, I have a name (Alex Softman) and workplace (FoobarSoft). In XML, the above information can be easily structured, for instance, as follows: <me> <human> <name>Alexander Gutman</name> <birthdate>01.07.1966</birthdate> </human> <mathematician> <name>Alex Goodman</name> <workplace>Blahblah Institute</workplace> </mathematician> <programmer> <name>Alex Softman</name> <workplace>FoobarSoft</workplace> </programmer> </me> The question is: How such a structure can be modeled via "usual" classes? Of course, there are many different solutions, but I wonder if there is a solution close (in flexibility) to that of XML. (You may use any concepts, including multiple inheritance.) -- Alexander E. Gutman ---------------------------------------------------------------------- ------ -- ---------------------------------------------------------------------- ------ -- To unsubscribe from this group, send an email to: xpl-unsubscribe@o... --- End forwarded message --- |