SCOUG-Programming Mailing List Archives
Return to [ 07 |
January |
2005 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Lynn H. Maxson wrote:
>
> In an earlier thread [Peter] posed the issue of
> natural language programming. So we seem to agree
> to want as close a match as possible between the
> descriptive language we use for the problem set
> and the prescriptive one for the solution set.
No. No. No no no no no.
"Natural language programming" is not linear in the classic computer
sense. It is boundary driven.
For example: "Read the monthly summary file. Extract the subtotal
records. Print them and create a total."
These three statements are _boundaries_.
"Read the monthly summary file" should generate the beginning and ending
of a block:
Open Input File (monthly summary).
Read Input File Until End.
...
Close Input File.
"Extract the subtotal records" should generate the beginning and ending
of a contained block:
If record is subtotal then do
...
nop
"Print them and create a total" should generate the beginning and ending
of another contained block:
Print the subtotal record.
Accumulate a total.
If at end of file print total.
The difference is that each statement generates the boundaries of a
block, and subsequent statements are rendered within the block. THIS IS
AN IMPORTANT CONCEPT. The statements are not linear programming
statements; they are block boundaries.
This is how we speak, and this is how we think. Each phrase narrows the
boundary. When someone doesn't speak in this fashion, we say they are
"scattered" -- all their thoughts are there (eventually), but not in an
orderly fashion.
Lynn: Stop thinking in terms of PL/I and its extensions. Think in
boundary blocks, and create your new programming paradigm accordingly.
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 07 |
January |
2005 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|