ontolog-forum
[Top] [All Lists]

Re: [ontolog-forum] C and Ada

To: "[ontolog-forum]" <ontolog-forum@xxxxxxxxxxxxxxxx>
From: Ed Barkmeyer <edbark@xxxxxxxx>
Date: Tue, 13 Nov 2007 11:41:33 -0500
Message-id: <4739D3BD.7050208@xxxxxxxx>
John F. Sowa wrote:    (01)

> I always thought that was the mainstream view:
> 
>  > I have long taken the view that the primary concern of a
>  > programming language is to communicate between people -
>  > a way of formally describing what we expect the computer
>  > to do and the rationale for that description.    (02)

I strongly disagree with "primary concern" here, and I do not for a 
moment believe this is the "mainstream idea".    (03)

A program is a design for a machine, a set of instructions for 
assembling off-the-shelf parts into a machine that performs some 
function.  Therefore, the primary concern of any programming language is 
to provide the ability to formulate a precise set of instructions for 
the assembly of useful machines.    (04)

There are all kinds of devices for communicating design intent between 
people, and only some of them are programming languages.  That is, only 
some of them are precise enough to be clear as to how to assemble the 
machine from a set of off-the-shelf elements.  And many of us have spent 
many years communicating problem-space understanding and solution design 
among people, using languages that are NOT (precise enough to be) 
programming languages as well as languages that are.    (05)

That said, the idea of "literate programming" -- writing programs in 
well-known patterns that make it easier for others to read, understand 
and maintain them -- is a very desirable goal, and a "mainstream" idea 
in software engineering.  The object for *modern* programming languages, 
therefore, is to be precise enough to support the design of useful 
machines, and to have a good enough set of off-the-shelf components and 
a sufficiently clear and simple means of expression to support "literate 
programming".    (06)

But horse first, cart second, please.  Historically, we first had to 
devise simple capable languages, then good patterns, then good common 
basic components, then better languages and better patterns.    (07)

The objective of Ada was to provide a solid set of off-the-shelf 
components for embedded software, and a capability for hierarchical 
abstraction (as Sean observed) that provided a simple means of 
expression that supported "literate programming".  At the same time, Ada 
demands a certain programming style that imposes discipline on the 
programmer.  And that discipline in turn improves the probability that 
other software developers will be able to read and understand machine 
designs written in Ada.    (08)

> That was certainly one of the main concerns of many of
> the pioneers in computer science, such as Dijkstra, Knuth,
> McCarthy, Perlis, etc.  Following is Knuth's website for
> "Literate Programming": ...    (09)

Absolutely correct.  "One of the main concerns", however, is 
substantially different in meaning from "the primary concern".    (010)

"Self-documenting software", on the other hand, is another Holy Grail 
that tends to send otherwise valuable knights off to do useless and 
counterproductive things.  After 40 years in this business, I will take 
"well documented software" over "self-documenting software" every day 
and twice on Sundays.  Good programming languages can make software as 
readable as possible; but only intelligent use of comments/remarks makes 
software as understandable as possible.    (011)

-Ed    (012)

P.S. And yes, Jay is right, we have chosen yet another tangent.    (013)

-- 
Edward J. Barkmeyer                        Email: edbark@xxxxxxxx
National Institute of Standards & Technology
Manufacturing Systems Integration Division
100 Bureau Drive, Stop 8263                Tel: +1 301-975-3528
Gaithersburg, MD 20899-8263                FAX: +1 301-975-4694    (014)

"The opinions expressed above do not reflect consensus of NIST,
  and have not been reviewed by any Government authority."    (015)


_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/  
Subscribe/Config: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/  
Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
Shared Files: http://ontolog.cim3.net/file/
Community Wiki: http://ontolog.cim3.net/wiki/ 
To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx    (016)

<Prev in Thread] Current Thread [Next in Thread>