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,5af5c381381ac5a7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!s9g2000yqd.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Ada requires too much typing! Date: Thu, 10 Jun 2010 00:20:35 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <03f84a0a-e070-43a9-9b68-920345f64f94@r27g2000yqb.googlegroups.com> <1c704c1e-1b2e-427f-ae0e-3b2a0f976c7c@y4g2000yqy.googlegroups.com> <10855f68-76a1-4600-ba65-464dab6c6274@w12g2000yqj.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1276154435 7590 127.0.0.1 (10 Jun 2010 07:20:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Jun 2010 07:20:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s9g2000yqd.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:11555 Date: 2010-06-10T00:20:35-07:00 List-Id: On 10 Jun., 08:34, Vadim Godunko wrote: > I want to known more about how to use OOP in Ada without access types! type Element is tagged ... subtype Any_Element is Element'Class; procedure Show (E: Element); A: Element; X: Any_Element := Initial_Value; Show (A); -- no dispatch Show (X); -- dispatches Show (Element (X)); -- no dispatch type Special_Element is new Element with ...; procedure Handle (S: Special_Element) is begin Show (S); -- no dispatch Show (Any_Element (S)); -- re-dispatch end Handle;