From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,63fa88e2f1a3ebea X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: zw@cs.man.ac.uk Newsgroups: comp.lang.ada Subject: Re: Universal type in Ada Date: 16 Jun 2005 06:23:51 -0700 Organization: http://groups.google.com Message-ID: <1118928231.090737.170070@g44g2000cwa.googlegroups.com> References: NNTP-Posting-Host: 130.88.192.82 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1118928236 23952 127.0.0.1 (16 Jun 2005 13:23:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 16 Jun 2005 13:23:56 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=130.88.192.82; posting-account=Z5_cDw0AAAAiVsYHnsUBMTESnujcktdr Xref: g2news1.google.com comp.lang.ada:11417 Date: 2005-06-16T06:23:51-07:00 List-Id: Hi, thank you very much. This is a great idea to create pointers to an Object. I also have the same idea, but my problem is a pointer must be declared with a specific type such as a pointer to an Integer. However, in Ada, when we declared Object as an abstract superclass, the existing types like Integer, Float, String are not an Object, we could easily define a superclass called "Object" and define all of our types inherited from the "Object", this way we will get roughly same functionalities like Object as the root type. However, there is no way to cope with existing types like Integer. I would like to know that whether this is possible to define a root type like "Object" in Java so that whatever a "Method" is, it will always return an "Object"? because all classes are inherited from "Object", so an Integer is an Object, a Float is an Object, ...........