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

Re: in defense of C



In article <5799@udccvax1.acs.udel.EDU>, mccalpin@vax1.acs.udel.edu writes:

   >   >I claim: A good engineer can generate a much richer and more useful set of
   >   >subroutines of this nature than found in ANY LANGUAGE DESIGNED BY COMMITTEE.
   >
   > But should every engineer *have*to* generate all of those subroutines?
   > Certainly it is possible to write your own error-checking code and
   > such, but many of us were hired to get work done, not to individually
   > re-created safe programming languages/environments.

Indeed, the expressiveness of a language depends not only on what the
language allows you to say but also on what it doesn't force you to
say.  Given any language with reasonable enough abstraction facilities
(chiefly procedures and macros) it is *possible* to write clean and
safe code, but not necessarily *easy* to do so.  

The hallmark of a language is the extent to which it abstracts over
common programming patterns.  If Scheme didn't support SET! or
CALL-WITH-CURRENT-CONTINUATION it would be possible to simulate them
by passing an explicit store and continuation to every procedure (in
the denotational semantics "style"), but programs would become
cumbersome to write and impenetrable to read.  SET! and
CALL-WITH-CURRENT-CONTINUATION are useful language features exactly
because they embed into the language patterns which otherwise would
have to created again and again by hand.  

A similar argument can be made for a variety of other language
features: types, data abstraction facilities, error-handling
facilities, etc. Sure, it's always possible to simulate these in some
explicit fashion; but do we want to *have* to?

- Lyn -