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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.38.38 with SMTP id d6mr38409572pbk.4.1317377276216; Fri, 30 Sep 2011 03:07:56 -0700 (PDT) Path: lh7ni8199pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!news.internetdienste.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 30 Sep 2011 12:07:53 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20110922 Thunderbird/7.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: discriminant questions References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <1tpl2pc36ptr4$.txv4v3wmkjlm.dlg@40tude.net> <1malv6h6q31j3.uz9ws5j0glnm.dlg@40tude.net> <4e81a2f4$0$7624$9b4e6d93@newsspool1.arcor-online.net> <4e81e788$0$6542$9b4e6d93@newsspool4.arcor-online.net> <4e8210ab$0$6550$9b4e6d93@newsspool4.arcor-online.net> <4e83b568$0$7620$9b4e6d93@newsspool1.arcor-online.net> <1vb9afcggqs8b$.prrlzbnf51p$.dlg@40tude.net> In-Reply-To: <1vb9afcggqs8b$.prrlzbnf51p$.dlg@40tude.net> Message-ID: <4e8594fa$0$6629$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 30 Sep 2011 12:07:54 CEST NNTP-Posting-Host: b48e9dde.newsspool2.arcor-online.net X-Trace: DXC=TCUeMMSSUMSYI9]OHn9o5^A9EHlD;3YcR4Fo<]lROoRQ8kFejVXk?inT6?6 On 29.09.11 10:26, Dmitry A. Kazakov wrote: >> Huge difference. A programming language such as Ada is about >> a universal computing apparatus. Mathematical language can do >> without such an apparatus, > > Come on, it is not XIX century. Mathematical language is all about such > apparatus: axiomatic frameworks + inference, nothing else. All major > achievements of XX century mathematics lay in understanding of multiplicity > and studying the limitations of such apparatuses. Back on track: my question was whether or not a language should enable programmers to implement or override what is built into the language core. Consequently, whether or not additions to Ada should be made such that programmers can implement language by following the rules of a "feature's interface". Whether or not programmers should be able to correctly manipulate language features. Where should we draw a line, if any? (Mathematics is insufficient as a model. Its vocabulary and focus, that is, its language, do not describe the same objects as does programming language design. In one direction mathematics is more inclusive, but in another it looses sight of the "electrical things", and tends to ignore time and space, and quite reasonably so, when mathematicians hope for inspiration to come from something other than algorithmic work. (This is why I think that mathematics provides for inspiration, but is leading the wrong way as the sole inspiration for language. Just recalling the commercial, organizational, electrical, etc contexts that you and I have been stating more than once.) > Has the number 12.3 general purpose, or specific > to the domain of numbers smaller than 13? The sqrt operation is not general purpose in that there is only a selection of programs that ever use it. Whether the sqrt operation has a purpose in and of itself I do not know. If Sqrt is not ubiquitous in programs, then it should not be part of the very core of a general purpose language. There is no simple yes-or-no scheme that can determine whether or not an operation fits a general purpose. More below. > A "primitive universal computer" runs what? [answer: one or more tasks] > Task in the meaning "subject of scheduling" is not only primitive, it is > atomic, semantically there is nothing a task could be divided into. This definition of task cannot serve the goal of establishing program construction facilities of programming languages, and of Ada in particular: it is lifting the point of view too high; we don't see the vocabulary any longer; when I write a program, it is precisely the divisions of a "subject of scheduling" that should be expressible using built-in language. (Similarly for the communications.) Why be concerned with built-in language? Because built-ins are important, more important than other modes of dividing insofar as programmers find them more important. Insofar as program change management finds them important. I'll also prefer "task" to mean something that Ada programmers would recognize. >> The level of detail in a concept is the biggest factor in "heavy" IMO. >> Heavy things might be useful, they might feel right, they might be >> efficient (or free). > > Again, "heavy" is meaningless outside one of three contexts: 1) > computational environment ("hardware language"), 2) the programming > language, 3) the problem domain. Plus: 4) compiler making business requirements, 5) programmers, customers, already mentioned, and further ingredients of the programming situation. A general purpose programming language will IMHO either be a panacea that includes, in its definition, every mechanism ever invented, or tries to be minimal in some sense. To clarify, the notion of general purpose language can be set against special purpose language or domain specific language. Should a language like Prolog be defined such that implementers must provide for programmers who wish to override the database scanning implementation? Or replace the backtracking implementation with one of their own? Alternatively, the customer/programmer can just have a Prolog shop make an implementation the meets their special requirements. This will leave the implementations of scanning and backtracking inaccessible by programmers, but the programmers will achieve their goals. Seems healthy to me, because programmers should not be concerned with adjusting implementations. They should use the tools, not manipulate them. We also need to know what "minimal set" is, regarding 1) - 5). Also, completeness of a minimal set, regarding 1) - 5). The interactions, the conflicting conclusions, etc. that will affect choices of language features. One data point is that "general purpose" (G) vs "special purpose" (S) can refer to effort it takes to write a program in G or S language that has a given effect. Indeed, another "difference is ... how much source code it takes and how simple would be to maintain such code." >> "Delay" is a key word of Ada the language (and not in Ada >> the library) whereas this is not usually the case with other languages: >> their "primitive thoughts" have been different, and have not considered >> the same requirements of control. >> >> Should there be an "interface" that allows programmers to implement >> the meaning of "delay" instead of the language doing it? > > These are two different issues here: > > 1. Syntactic shape of delay > 2. Its semantics (e.g. user-defined) > > 1. The shape of delay is irrelevant (e.g. can be a subprogram) I beg to differ, the shape of "delay" signifies that "delay" is important, with or without the reasons that follow from the language formalism. I'd rather not see it replaced with something that looks ordinary and simply hides compiler magic. > 2. The semantics of delay is fixed in real-time systems and need not to be > redefined. But, considering simulation systems, where time is simulated, it > would be thinkable to have Duration, Time user-defined and delay > overridden. > > What was the point? As outlined in the Prolog case, I prefer such changes to be the subject of creating a suitably adapted implementation. Not my job, not the programmer's job. There is also a matter of choice: should every effective feature of the language be a type? I see two cases: (1) the polymorphic "delay" does not change overall behavior. For example, the intention is to scale time logarithmically, for the purpose of simulating a technical process that takes long. This keeps relative timings. But we can just wrap the scaling into some function that returns durations depending on configuration. This does not need new or polymorphic duration/time[_span]. (2) the behavior of "delay" is to change, for example, relative timings and or order would differ from the timings of the real thing even when, by the LRM, they should not. Ideally, (2) would not be portable at the syntax level. After all, program behavior changes. Such a change is surprising when seen from an Ada perspective, and therefore assuming that certain features of the language are not even polymorphic.