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!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Wed, 15 Jun 2005 18:31:03 +0200 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Universal type in Ada References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42b057b9$0$1137$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 15 Jun 2005 18:30:49 MEST NNTP-Posting-Host: c366f8e1.newsread4.arcor-online.net X-Trace: DXC=eS?2?UnFPlOeoBec=`Q1lF:ejgIfPPldDjW\KbG]kaMH]kI_X=5KeaF zw wrote: > Because > in Java if a method returns an Object, it could be casted to any other > types that are subtypes of Object. Depends on what you mean by "could". You will have to know the type of your object unless a ClassCastException is o.K.. You could start expressing a minimal set of expectations that your Ada program is going to have of a type. Then use polymorphism down that type's hierarchy.