"Mark Wills" <
markrob...@yahoo.co.uk> wrote in message
news:d81d9a4b-10f6-45fb...@s2g2000vbj.googlegroups.com...
[...]
> Forth is perfectly good at abstraction. With the right factoring it's
> possible to produce code that reads almost like English.
OMG! I can't believe you just said that. I'm feeling queasy now and think
I'm going to be sick ...
The reason I think I program well is because I'm nowhere near as good with
English (or wasn't years ago...) as I am with a programming language.
Programming languages aren't supposed to be just like English. There are
too many ambiguities and complexities with English.
> That's not possible with LISP or C which require parenthesis
> and a myriad of other punctuation in order to guide the compiler.
I can't say that's a benefit for LISP. LISP is known for too many of them.
But, that's a benefit with C. There is a clear distinction in C between
operators and keywords. In general (with a few exceptions), the operators
are symbolic and perform some action: arithmetic, address-of, indirection,
indexing, etc, while keywords are names of things: control-flow, variables,
structures, procedures, etc. Early Forth introduced symbolic naming too: @
! +! : ; + - etc. I think Forth doesn't have enough of it, personally.
It's too "wordy" in the sense that it has many words instead of symbols. I
never liked .LE. or .GT. etc for Fortran, and so don't like XOR and AND etc
for Forth.
> The real offenders were the early BASIC variants, with their terrible
> line numbers! Yack. Thank goodness we've seen the last of those!
(I've discussed much of this previously, but I don't recall if it was on
c.l.f. It might've been c.l.m. or a.o.d. etc.)
I think most of the advantage of line numbering at the time was because it
allowed a simple line-oriented "text" editor to be used. But, I don't
recall line numbers being as bad as you remember. Usually, there is a
command (or utility) to renumber the program from a starting line number and
an increment. But, as long as you left a spacing of 10 or 20 between line
numbers originally, you rarely needed to renumber even after many more
lines.
The bad thing about languages that used line numbers had nothing to do with
line numbers: GOTO. If someone programmed BASIC without knowing
structured programming concepts, they ended up with "spaghetti" code - code
which jumped all over the place. Yuck!
A few years ago, I looked at a BASIC I once used to see what merit it had
"today" (a few years ago). This BASIC was on the C64 which I think was an
MS product (?). About the only thing of merit was the string concepts of
right$, left$, mid$, and '+' for concatenation. That's still useful for a
variety of languages today, except for a language like C which has more
powerful equivalents (and no ability to use $ in a name...). I thought the
old BASIC was sufficiently limited that it'd have to be thoroughly reworked
for effective use in a modern environment. I.e., good for 8-bit, but not so
good for 32-bits. E.g., functions limited to what fits on one line, or
limitations of DIM and DATA, or need to use CHR$ or ASC.
That said, I also programmed BASIC for one industrial machine. It was very
effective in that situation. BASIC supplied the console input and output
(keyboard & screen), ability to load and save files, interactivity of an
interpreter, a line editor, and of course the language itself: variables,
control-flow, arithmetic, etc. The machine's operations weren't controlled
by BASIC. An escape character was used to send (or redirect) machine
commands to the machine. So, a bunch of lines in the program would begin
with the escape character. This piece of equipment was an old machine when
I programmed it a decade ago, but I can see any type of modern CAM or CNC
mill or plotter etc working well with the same concept. Wikipedia says the
same basic concept is called "parametric programming" on it's CNC page. So,
I'm not sure why someone added the words:
"A more recent advancement in CNC ..."
Rod Pemberton