Re: Larkin, Power BASIC cannot be THAT good:



In article <U9idnercWrf-rI7XnZ2dnUVZ_tednZ2d@xxxxxxxxxxxxx>,
Phil Hobbs <pcdhSpamMeSenseless@xxxxxxxxxxxxxxxxxx> wrote:

It isn't GOTO that's horrible, it's named labels. Every time I come
across a named label in code, I have to go figure out every single place
in the code where the jump could have originated. Ugly ugly ugly. For
a state machine, it would be very unlikely to come from more than 100
lines away, which is barely acceptable. A switch statement in a
while(1) loop [or for(;;), which is more idiomatic] is the way to go for
state machines. That way you know where the code begins and ends, and
the machine code is equivalent.

There was a joke article many moons ago proposing a COMEFROM statement,
which would silently put a jump anywhere you liked--not very different
from a named label!

It could be worse.

The FORTRAN "Assigned GOTO" was distinctly worse than a C "goto".

The worst such in a traditional language, I think, was the use of the
ALTER verb in COBOL, which could modify (at runtime!) the intended
target of a single-sentence GOTO paragraph. As a result, you couldn't
trust any such GOTO in COBOL to do what the source code said it did -
you had to check the rest of the program to see if it was ever
ALTERed.

brrr<<... it gives me chills and a queasy stomach just thinking
about it.

The worst I've run into recently, is the control language for a
radio-repeater controller I've helped set up. The language has a
whole bunch of primitive op-codes (which take a variable number of
parameters) stored in "macros" (think "subroutines"). Macros can call
one another (up to a limited depth), and many are called automatically
by the controller under certain conditions (time, carrier received on
a radio channel, etc.).

No, this control language doesn't have GOTO. Nor, sadly, does it have
anything resembling IF/THEN/ELSE. The *only* method it provides to
alter the form of control, is for one macro to change the code in
another macro (deleting it entirely, inserting or deleting specific
opcodes in its list, or copying its contents from a third macro).

Yup.. the only way to do *any* conditional coding in this language, is
to use self-modifying code. It's like the ALTER verb on meth.

It's definitely a waltzing bear.

--
Dave Platt <dplatt@xxxxxxxxxxxx> AE6EO
Friends of Jade Warrior home page: http://www.radagast.org/jade-warrior
I do _not_ wish to receive unsolicited commercial email, and I will
boycott any company which has the gall to send me such ads!
.



Relevant Pages

  • Re: Three Dog Problems
    ... If you can control the meaning of words, ... This is too narrow a view for the role of language. ... Orwell was just.... ... His idea of history and its control, culture and its control, ...
    (sci.cognitive)
  • Re: OT: The usual libidiot hustle
    ... the meaning of language" as meaning "using ... A Key Mechanism of Control ... one of the key points in the GOPAC tapes is that ...
    (alt.guitar.amps)
  • Re: Suggestion for review: a taxonomy of thread safety
    ... > I have successfully implemented event-based robotic control ... > systems using multiple threads of control. ... > program had no such problems was because I used a language ... It will write to a shared memory area. ...
    (comp.programming)
  • Re: definition of a highlevel language?
    ... to the language of the problem domain. ... while control: ... And if you would propose this solution to a control system engineer, ... So an adequate high level language, ...
    (comp.lang.python)
  • Re: Increasing efficiency in C
    ... > You keep control of everything. ... C is a 'lightweight', *flexible* language. ... Depends upon the machine, but yes, imo one should ... nor 'plug-board' programming ...
    (comp.lang.c)