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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: for S'Image use Func?? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> <87632vwikr.fsf@ludovic-brenta.org> <112n6z3554srr$.tjzjtg467xfo.dlg@40tude.net> <1fv8frriu1h4s.g9jy78q1c0io.dlg@40tude.net> <7a31eab7-1a1c-4653-bf49-ff1498e318f9@b18g2000yqb.googlegroups.com> <199e07cb-2e93-40fc-974d-000b83b6000f@s29g2000yqd.googlegroups.com> Date: Wed, 12 May 2010 17:58:42 +0200 Message-ID: <16vlvmzpbalm5.1chuumyyuyb2j$.dlg@40tude.net> NNTP-Posting-Date: 12 May 2010 17:58:39 CEST NNTP-Posting-Host: dc4bb90c.newsspool1.arcor-online.net X-Trace: DXC=Vm?ZcGBUJ0eUoRk[hk2Walic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbkkLKTNdlU2f[6LHn;2LCVn[ On Wed, 12 May 2010 06:16:05 -0700 (PDT), Maciej Sobczak wrote: > On 11 Maj, 23:46, "Dmitry A. Kazakov" > wrote: > >> Why an Ada program handling texts need to be aware of your system? > > Because it is running on my system. It's a pretty good idea to have > some local awareness. No, that makes the program non-portable and fragile against system modifications. >> Ada.Text_IO provides an OS-independent abstraction of a text. > > The above is not even wrong. Ada.Text_IO cannot even *name* all the > files that I have on my hard drive. That has nothing to do with text. I agree that Ada.Directories is broken. But that is exactly because it lacks the level of abstraction Ada.Text_IO has. (BTW, you cannot enumerate all files with C I/O either) > Even assuming that I can open some file, the whole "abstraction of a > text" is severely limited. I cannot, for example, read the second > paragraph of the third chapter of the book that is in the file. It is necessarily limited here because not every text is a book. >>> Unfortunately, in Ada the formatting and I/O are entangled in Text_IO. >> >> No. See A.10.8(18) and F.3.3. > > Wrong. They do not relate to Text_IO. That is what you asked for, a not entangled formatting. > Even assuming wider context, formatting without I/O is trivial, but I > cannot have I/O without formatting. Why not? > Text_IO gives me both. > But on the other hand, I'm not sure how I/O without formatting would > look like - that would have to be a plain stream. Which means that > your "abstraction of a text" is little more than a bit of formatting > glued on top of a stream. Sure. Stream is unsuitable for text. It does not make sense to format streams. You do it in UNIX, because it lacks texts, because its file system is "untyped". >> The problem of Text_IO is columns. > > Not only. It cannot detect the end of stream without blocking, for > example. That is a property of the stream. Don't use streams as texts. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de