A
Alwyn
[ ... ]
There was also *Software Tools* by Kernighan and Plauger,
Yes, but it's a non-sequiter -- both the original (Ratfor) and second
(Pascal) editions of the Software tools book were intended to be
portable to many different environments.
I thought it followed quite well, actually: the broadening of 'the Unix
approach' to include non-Unix platforms.
What makes _The UNIX Programming Environment_ significant is that it
was NOT intended to be portable at all. It was intended to target UNIX
and only UNIX, but now it applies about equally to nearly _all_ OSes
in wide use.
It doesn't apply to Microsoft Windows, surely, though I'm told there is a
limited sense in which that could be considered POSIX-compliant. Cygwin
doesn't count, as it is a deliberate attempt to recreate a Unix-like
environment on a foreign system in order to take advantage of open-source
tools and applications.
Yes -- I remember reading this when it was originally published. While
most of what he said was true, it seemed to me quite an unbalanced view
at best.
Of course it is tendentious, but since I see this as an essay rather than
an academic paper, I find this an asset rather than a liability. It gives
us a highly readable insight into the mind of Brian W. Kernighan.
Looking at it again today, I'm even less impressed. Just for example, he
notes that Pascal's type definitions, such as:
type x = integer;
y = integer;
didn't produce truly new types -- you could mix arithmetic on x's and
y's and normal integers.
I took that as more of an observation than a criticism, though.
At the time, this was more or less a moot point, as C lacked any analog
to type definitions. When C added typedefs, however, they worked
essentially the same way as Pascal's type definitions.
Arguably the winner of this argument was Ada, which allows both the
Pascal/c style type definitions (where the new name is basically just
short-hand) but also has the ability to define a new type based on a
base type, but entirely separate from it.
Yes, and in Haskell:
type MyType = Int
makes 'MyType' a synonym for 'Int'; wherever I could write 'Int', I can
now write 'MyType'.
But I can also write:
newtype MyType' = IntNum Int
in which case I have created a whole new type which happens to have the
same representation as 'Int'. I now have work to do to give 'MyType''
acceptable behaviour, probably by making it an instance of class 'Num' and
defining the operators '+', '-', '*' etc. for it.
Anyway, thanks for the reminder of a simpler time; language wars
remain, but most of the issues have changed a LOT.
Well yes, the discourse has inevitably moved on, though many of the old
controversies and misconceptions remain; few questions have been
definitively resolved, and there is little in the way of consensus.
Alwyn