× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A candidate for natural language in a programming language is PERL - written by a linguist, Larry Wall. Syntax is not locked into a certain order, for example. Haven't dabbled in a long time, so I have no examples. Sorry. But its byword is TMTOWTDI - There's more than one way to do it.

As for readable code = CL does have its *LT and *AND and *BCAT = I find the latter much more readable than |< and it will have no problem with variant characters. Is the "hook-over" character an invariant one in EBCDIC?

Vern

Dennis Lovelady wrote:
I remember back in college I loved the idea of a "readable" language.
One
where you wouldn't need !=, ||, && and the like. You could just say
things like NOT, EQUAL, AND, XOR, etc. There are some languages that
implement many of these common ones now days. SQL seems to be the
closest
that I've seen actually, and that is only a query language.

I am not trying to sell COBOL to this list (and I know I was taking my life
in my hands when talking about C on a list monitored by Simon [Hi,
Simon!])... but that language comes closest to any that I've seen -
including SQL - to natural language. Of course, look where that has gotten
it - but that aside, I do find merit in reading (but not typing)

IF sales-Amount IS NOT LESS THAN discount-Break-Point PERFORM discounting-routine
ELSE
PERFORM non-discounting-routine
End-if

Here's a COBOL feature that should be in every language:
IF discount-Code is equal to discount1 or discount2 or discount3 or
discount4 ...
(equally valid is "if dis-cod = d1 or d2 or d3 or d4" - it doesn't HAVE
to be wordy)
(Why make me say "is equal to" four times for such a test?) SQL at least
has the (welcomed) IN (list) phrase, which comes close.
I'll shut up now.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"I knew I was an unwanted baby when I saw that my bath toys were a toaster
and a radio."
-- Joan Rivers



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.