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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4ce5890331a5b529 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!postnews.google.com!a37g2000yqi.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Discriminants of tagged types Date: Sat, 30 Oct 2010 14:05:09 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3c44f6d7-7ff0-4362-8902-fbcfe0eee788@a37g2000yqi.googlegroups.com> References: <14314714-e92c-4036-9cbb-da8e72489261@h7g2000yqn.googlegroups.com> <3243de1d-c6b4-4845-ab5f-28ea4e9f5738@c20g2000yqj.googlegroups.com> <14f33f04-40f5-4a72-a18b-d511dd2eb3b3@w21g2000vby.googlegroups.com> NNTP-Posting-Host: 62.203.11.56 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288472709 32627 127.0.0.1 (30 Oct 2010 21:05:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 30 Oct 2010 21:05:09 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a37g2000yqi.googlegroups.com; posting-host=62.203.11.56; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:15962 Date: 2010-10-30T14:05:09-07:00 List-Id: On 29 Pa=C5=BA, 20:59, "Vinzent Hoefler" wrote: > > Just like a file descriptor. Yet, there is no reason for these things > > to be polymorphic. > > But they already are. > > Sometimes they are files, sometimes devices, sometimes sockets, ... No. File descriptors are just indices into some array of objects managed by the operating system. Just plain integers, like here: type Descriptor is Integer range 0 .. SOME_MAX; -- this is what you see type Array_Of_Files_Managed_By_System_And_Hidden_From_You is array (Descriptor) of File'Class; The actual objects are hidden from you and guess what? They have polymorphic behaviour (sometimes they behave like files, sometimes like devices and sometimes like sockets), but they are not themselves copyable. -- Maciej Sobczak * http://www.inspirel.com