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,39579ad87542da0e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.130.195 with SMTP id u3mr24208138qas.1.1368652331044; Wed, 15 May 2013 14:12:11 -0700 (PDT) Path: y6ni47014qax.0!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 15 May 2013 16:12:10 -0500 Newsgroups: comp.lang.ada Date: Wed, 15 May 2013 17:12:09 -0400 From: "Peter C. Chapin" X-X-Sender: peter@whirlwind Subject: Re: Seeking for papers about tagged types vs access to subprograms In-Reply-To: <1nkyb845dehcu.1sd90udwsrpdu.dlg@40tude.net> Message-ID: References: <1bfhq7jo34xpi.p8n2vq6yjsea.dlg@40tude.net> <12gn9wvv1gwfk.10ikfju4rzmnj.dlg@40tude.net> <1oy5rmprgawqs.1jz36okze0xju$.dlg@40tude.net> <1q2ql1e4rcgko.diszzq1mhaq8$.dlg@40tude.net> <518dedd4$0$6581$9b4e6d93@newsspool3.arcor-online.net> <1um7tijeo609b$.1gtdijp0acfmn$.dlg@40tude.net> <1nkyb845dehcu.1sd90udwsrpdu.dlg@40tude.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-2h6jqhCcdI0h1aPj1V2G4CLRFFIU3Qj3Msvasuh+KF4VUffR4+uZTq3bVlKw3DSPAMafrErPUSLuHDg!BsK3044D1C1hnxFASlqp/RGtcjBWQAc5Gc9e7Cost7+uC2bQ+Dq3N4iltI1QJS3UAVSApzObEA== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3822 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Date: 2013-05-15T17:12:09-04:00 List-Id: On Wed, 15 May 2013, Dmitry A. Kazakov wrote: >>> procedure Foo; >> >> This procedure does nothing unless it has side effects. If so, then those >> side effects entail operations on values of a particular type. > > Nevertheless it is an operation that does not refer to any particular type. It doesn't refer to the type in the source text because of the limitations of the Ada language (specifically, side effects remain undocumented). SPARK rectifies that to some degree with global annotations. However, the operation is still an operation on values of some type. >> A type is a pair of sets: a set of values and a set of operations defined >> over those values (for example as functions taking items from the first >> set as a parameter). Either set can be empty. In any case "value" is most >> certainly a programming language term. > > type Employee is ...; > > How is employee a language term? Weren't we talking about "value" as a programming language term? I understand that to mean "value" as something used by people when talking about programming languages. "Employees" is just a name in some program... and specifically the name of a type. I don't follow what this has to do with a discussion about values. > task type Driver is ...; > > Show me an RM section which defines the values of this type. The values of a task type are the code fragments that implement the task. Here I'm speaking in general terms, of course. > And the simplest possible example why the language has nothing to do with > values is this: > > type Some_Transcendental_Numbers is (e, Pi, Euler); > > What is the value of e? Some_Transcendental_Numbers is an enumeration type. One of it's values is 'e'. There is no significance to 'e' other than that. At least at the level of types. Peter