comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: Strings and reading from a file
Date: 1999/05/13
Date: 1999-05-13T22:14:53+00:00	[thread overview]
Message-ID: <t77lqcehtn.fsf@calumny.jyacc.com> (raw)
In-Reply-To: 373B271F.EA28F9C8@pwfl.com

Marin David Condic <condicma@bogon.pwfl.com> writes:
> However - enamoured as I am with the "perfect" solution that works for
> any case that may arise - I'd wonder if in practice it isn't a bit of
> overkill.

No, it's not. One of the most annoying things about the old, pre-GNU
UNIX utilities were the plethora of built-in line limitations they
had. It is in the exceptional situations where you most need your
tools working properly. If the tools silently discard lines which
are too long, or divide them into several lines, or crash, or die
with an exception, that's a very bad thing.

For example, my .newsrc file, which is a plain text file, has some
very long lines in it. I have a little awk script which finds the
widest line in a file. On Solaris, nawk aborts with

	nawk: input record `comp.lang.c++! 63853...' too long

On Linux, everything runs fine, and I discover that the longest line,
for comp.lang.c++, is 27530 characters long!

If you find yourself fighting the language in order to handle input of
arbitrary size, then it's a problem of the language. I know that it's
not much of an issue in C++, and I would guess it's not much of an
issue in Ada either. Limiting input to the size of a fixed buffer is
just laziness or incompetence.




  parent reply	other threads:[~1999-05-13  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-12  0:00 Strings and reading from a file Cameron Hodge
1999-05-11  0:00 ` David Botton
1999-05-12  0:00 ` Robert Dewar
1999-05-12  0:00   ` Cameron Hodge
1999-05-12  0:00     ` Marin David Condic
1999-05-12  0:00       ` Tom Moran
1999-05-12  0:00         ` Marin David Condic
1999-05-13  0:00       ` jrcarter001
1999-05-13  0:00         ` dennison
1999-05-13  0:00           ` Martin C. Carlisle
1999-05-13  0:00             ` Marin David Condic
1999-05-13  0:00               ` Keith Thompson
1999-05-14  0:00                 ` Pascal Obry
1999-05-13  0:00               ` Hyman Rosen [this message]
1999-05-13  0:00             ` David Botton
1999-05-13  0:00               ` David Botton
1999-05-14  0:00               ` Jean-Pierre Rosen
1999-05-14  0:00                 ` Keith Thompson
1999-05-14  0:00                   ` David C. Hoos, Sr.
1999-05-14  0:00                     ` Keith Thompson
1999-05-15  0:00                       ` David C. Hoos, Sr.
1999-05-16  0:00                   ` Jean-Pierre Rosen
1999-05-15  0:00             ` jrcarter001
1999-06-05  0:00               ` Matthew Heaney
1999-05-12  0:00     ` David C. Hoos, Sr.
1999-05-12  0:00   ` dennison
1999-05-12  0:00 ` Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox