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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4ce5890331a5b529 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Discriminants of tagged types Date: Thu, 28 Oct 2010 19:48:50 +0200 Organization: Ada @ Home Message-ID: 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: QvYx37xMZgYhqeNrMxqN1Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news1.google.com comp.lang.ada:14904 Date: 2010-10-28T19:48:50+02:00 List-Id: Le Thu, 28 Oct 2010 10:50:51 +0200, Maciej Sobczak = a =C3=A9crit: >> This has nothing to do with copying. Consider a handle of a resource,= = >> e.g. >> HWND as an example. It is bound to the resource, nevertheless it is >> copyable. > > [...] > What would it mean to copy a file object? Should the file on disk be > copied as well? Should the data that is still in the buffer be copied?= > And so on. Instead of answering these questions in an unsatisfactory > way, it is better to outlaw the dubious operation up front. Proxy objects needs not to be all the same. At least the Windows API do = = this (as others OS do) : you may open a file multiple times, get multipl= e = handles to it, with for each, different access rights. The handle is not= = the file, this is a kind of proxy to a file's physical instance. The = application on its own side, may do the same with handles, and hide file= = handles behind proxies (two levels). This is even a common construct, as= = in most designs you have references, smart references and proxies allove= r = the place. You obviously have the same with object whose intent is to draw on the = screen. May be this is too much wide to be uniquely identified and when the = concept is referred to, it finally just tell few (and that's what may ma= ke = its exact intent smoggy). -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens.