[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Names and primitives in SRFI 56

This page is part of the web mail archives of SRFI 56 from before July 7th, 2015. The new archives for SRFI 56 contain all messages, not just those from before July 7th, 2015.



bear wrote:
> Character strings are not binary.  They are characters. Binary is data
> without interpretation.  Characters are an interpretation of binary
> data.  These are different ideas.

More generally, I/O models differ in at least three ways:

1. Interpretation of individual units (e.g., characters, bytes)
2. Handling of variable-length units (e.g., CR+LF, combining characters)
3. Structure of I/O (e.g., stream, record, binary objects)

Many languages simply follow the assumptions of the operating system for
which they were originally designed. For example, the original C
language assumed that bytes and characters were synonymous, that there
are no variable-length units, and that all I/O is stream-oriented. The
ANSI C standard expanded the model to handle variable-length units, but
it still assumes character/byte equivalence and stream sequencing. Newer
languages in the C family have adopted the ANSI C assumptions, as do
many higher-level languages that use C for the underlying
implementation. In contrast, languages like COBOL make radically
different assumptions. They assume record-oriented files to support the
operating systems they were designed for.
-- 
Bradd W. Szonye
http://www.szonye.com/bradd