Why 'r' mode anyway?
claird at lairds.us
Sat Jan 15 09:08:03 EST 2005
In article <mailman.731.1105747996.22381.python-list at python.org>,
Tim Peters <tim.peters at gmail.com> wrote:
>reading up the bits in the index and offsets too, etc. IIRC, Unix was
>actually quite novel at the time in insisting that all files were just
>raw byte streams to the OS.
Not just "novel", but "puzzling" and even "controversial".
It was far from clear that the Unix way could be successful.
>but generally where it's reasonably easy to hide. It's not easy to
>hide native file conventions, partly because Python wouldn't play well
>with *other* platform software if it did.
>Remember that Guido worked on ABC before Python, and Python is in
>(small) part a reaction against the extremes of ABC. ABC was 100%
>platform-independent. You could read and write files from ABC.
>However, the only files you could read from ABC were files that were
>written by ABC -- and files written by ABC were essentially unusable
>by other software. Socket semantics were also 100% portable in ABC:
>it didn't have sockets, nor any way to extend the language to add
>them. Etc -- ABC was a self-contained universe. "Plays well with
>others" was a strong motivator for Python's design, and that often
>means playing by others' rules.
At a slightly different level, that--not playing well enough
with others--is what held Smalltalk back. Again, a lot of
this stuff wasn't obvious at the time, even as late as 1990.
I think we understand better now that languages are secondary,
in that good developers can be productive with all sorts of
syntaxes and semantics; as a practical matter, daily struggles
have to do with the libraries or how the languages access what
is outside themselves.
More information about the Python-list