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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!postnews.google.com!d27g2000yqc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Tue, 11 May 2010 06:35:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> <87632vwikr.fsf@ludovic-brenta.org> <112n6z3554srr$.tjzjtg467xfo.dlg@40tude.net> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1273584939 12708 127.0.0.1 (11 May 2010 13:35:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 11 May 2010 13:35:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d27g2000yqc.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:11490 Date: 2010-05-11T06:35:39-07:00 List-Id: On 11 Maj, 10:35, "Dmitry A. Kazakov" wrote: > >> Coming back to I/O - what I miss in Ada is the equivalent of fread in > >> C - that is, an operation that reads *up to* the given number of > >> bytes. Or maybe there is something that I didn't notice? Such an > >> operation is an important basis for custom buffered input. > > It is a basis for creating inefficient time and space consuming programs. > But we had this discussion before. No, we didn't. The discussion we had before was about buffered *output*, not input. Somebody called "Steve" jumped in and suggested that "Either you are miscommunicating or you are just plain wrong" (these words can be used to find that thread). Now we might have a different discussion about *input*. :-) OK, really - what's exactly being inefficient in buffered input? > I would like to add that "read a byte" is a property of a stream. Not all > files ("everything") are streams. I don't want to read all files. In particular, I don't want to read database files. What I want is a stream interface to the blobs that my filesystem is storing for me, so that I can build higher-level constructs on top of it. Oh, wait - we had that discussion already. ;-) > The bottom line is, Ada does it right (tm). If it did it right (tm), I would not have to reinvent My_Better.Text_IO. With all due respect to some of the engineering pearls that are related to Ada, the standard Text_IO package sucks, terribly. -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4