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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Thu, 14 Sep 2017 09:33:20 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <915874b5-52c0-4aa8-9023-82fddedb816f@googlegroups.com> NNTP-Posting-Host: vZYCW951TbFitc4GdEwQJg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:48125 Date: 2017-09-14T09:33:20+02:00 List-Id: On 14/09/2017 08:57, G.B. wrote: > On 13.09.17 21:34, Dmitry A. Kazakov wrote: >> On 2017-09-13 19:39, G.B. wrote: >>> On 13.09.17 09:30, Dmitry A. Kazakov wrote: >>>> On 12/09/2017 23:04, G.B. wrote: >>>> >>>>>     X := new Message' ("Help me"); >>>>>     Y := new Messagio'("Aiuta me"); >>>>> >>>>>     --  entering Little Italy: >>>>> >>>>>     X := Y; >>>> >>>> Shudder. >>>> >>>>> So, if you want to perpetuate the hazards of strings, ask the ARG >>>>> for a ready made storage pool for strings. >>>> >>>> What is so specific about string storage pool? >>> >>> The fact that the pool will be there, doing its work without >>> being noticed, to please those customers who don't like thinking >>> about string handling and associated storage management. >> >> Which work? > > OT: "The key to counted strings is that they need to be first class > objects. >  The compiler must know how to handle them." Both is wrong. 1. Bounded-length strings need not to be first class if the language type system capable of handling them. Ada's type system almost can, up to the moment when the user-defined object must expose array interface. 2. The compiler need not to know anything beyond user-provided implementation of the ADT. > Thus, the work of handling strings. Strings in particular, because > apparently > teachers think that they teach something valuable when they suggest > using natural language strings or other semi-formal lumps of characters > in a formal program's text. Why these must be strings and why this specific kind of string? Remember that bounded-length strings are in most cases premature optimization, because problem space bound either does not exist (e.g. non-static) or unknown. So the teacher is supposed to explain why X must be up to 100 characters long? Then the very idea of assigning strings is bad. > Let's say that, seeing A. Perlis and A. Stepanov as professional > mathematicians, there is an attitude---surely not theirs---that tries > hard to make computation be classified information never to be > shown to others. It is a mistake, though, to think that only the > "result" of a computation is important, in that all of the > computation affects "world". When and to what extent does this > "extended result" affect {plan, system, supplier, customer}? > Can you sell the effects? You seem equate single act of computation and a process continuous computations, i.e. in a control loop. Furthermore, there is a question of abstraction, At each level of abstraction there are exposed computational elements and hidden implementation-defined ones. Anyway, if you consider computation so important for education, then you should not ask hiding memory management and issues of string assignment from the students. > This is a challenging research topic for mathematicians specializing > in programming: > >  - to not exclude operations' effects from function specifications >    (yes, specifications; it is partly done already when their >     descriptions mention amortized cost) > >  - to include more effects of operations when describing results. OK > Counted strings, then, serve the attitude that tries to indeed > move education under the carpet (compiler), and for strings only. > (Because, then, you don't _need_ to teach all those things that > make counted strings work, and you move on to the _important_ > stuff...) and in plain contradiction to the stated goals... >> Furthermore your example > > tries to allude to what might be a long term effect of counted > string equivalents on professional programming if you use them > in education, which you had explained further. Yes, wrong paradigms have those effects. Not a reason to adhere to them. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de