On 2015-08-21, at 07:45, Phil Smith III wrote:

> Paul Gilmartin asked:
>> (How does CSV handle a field where the datum contains a newline?)
>
> Seen this: it Just Does. So if you view the data, it looks like:
>
> Somefield,"someother
> Field",a third field
>
> Just one reason why CSV is a hack...
>
I'd prefer to see embedded commas and newlines encoded, in the fashion
of HTML, rather than surrounded by quotes.  The latter is hard to
parse, and even harder to recognize visually.

But it's cultural.  OS/360 and VM arose from a unit record environment.
Programmers from a stream data environment are far more comfortable
with newline as a data character.  They might even deem Pipelines
"a hack" for doing otherwise.

The Apple ][ developer's Interface Guide counseled:

o Do not refer to the SPACE character.  Users perceive space as not
  a character but as the absence of a character.

o Do not refer to the Carriage Return character.  Users perceive
  Carriage Return as an operation, not as an object.

But I watched a girlfriend, a computer novice, preparing a text
document using the Apple ][ Pascal editor, which seems to violate
both precepts.  She had no more trouble using Backspace to delete
a blank than to delete any other character.  And she readily,
intuitively learned to split a line by positioning the cursor and
pressing ENTER, and to join two lines with Backspace.  I suspect
she perceived Backspace not as "delete character" but as a more
general "UNDO".

TECO let me join two lines with Backspace (twice; the DEC newline
was two characters).  Vi won't let me do that; I find it irritating
that if I press ENTER but have second thoughts I can't simply UNDO
it with Backspace; I must do something else.

And most WWW text entry processes likewise treat newline as a
character that can be inserted to split a line, or removed to
join two lines.  They got there by survival of the fittest.
Imagine any alternative such as a "Join lines" and a "Split
line" button associated with each text entry field.  Only 3270
fails to support Split and Join as local editing operations,

-- gil

Reply via email to