Re: The fate of Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
> 
> Derek Parnell wrote:
> 
> > Juergen Luethje wrote:
> >>
> >> Patrick Barnes wrote:
> >
> > [snip]
> >
> >>> Is there anything that can be done with GOTO, that can't be done with
> >>> a full set of high-level program flow statements?
> >>
> >> No, there isn't. Scientists have proved that.
> >
> > Yes, there is. Execute faster.
> 
> Sometimes faster, and sometimes slower:
>    <a
>    href="http://www.stevemcconnell.com/ccgoto.htm">http://www.stevemcconnell.com/ccgoto.htm</a>
> 
> So this is not a convincing argument.


Juergen, I tend to choose my words carefully in a public forum, where it
is difficult to 'discuss' points. I want to be both brief and precise.

The question was "Is there anything that can be done with GOTO, that
can't be done with a full set of high-level program flow statements?"

And my answer was " Yes, there is. Execute faster."

What I meant was, there are situations in which a GOTO can produce faster
running code that any other contruct. Steve McConnell also lists this
as a quote of Knuth (1974).  This is a true statement. Thus there is 
something that a GOTO can achieve that high-level program flow 
statements can not.

And true, it is also possible that in *other* situations, a GOTO can 
produce slower code. But that was not the question.

> > My position is this...
> >
> > A programming language is a tool to help people write and read programs.
> > GOTO is useful for some people.
> > No one is forcing people to use GOTO if it is present in a language (except
> > assembler maybe).
> 
> This might be true, or it might not be true.
> Thanks that you wrote above: "... and read". So "use" can be writing or
> reading.

Yes, **WRITING** and **READING**. We must consider both aspects.

> True is:
> No one is forcing people to *write* GOTO if it is present in a language.
> What about:
> No one is forcing people to *read* GOTO if it is present in a language??

This is also true. If Kat writes a program with GOTO in it, I am not 
forced to read that code.

> The always repeated argument: "No one is forcing people to use GOTO."
> (meaning "No one is forcing people to *write* GOTO.") only takes one
> side of the coin into account.

You, and not myself, have interpreted my word "use" as "write". I did not 
mean "write", I meant "use". Both reading and writing. I choose my words
carefully. Do not place words into my mouth. If I have been unclear or
ambiguous, please ask for clarification.

> As a layman and autodidact, much that I know about programming comes
> from reading source code by other people. I'm not actually "forced" to
> read source code by other people, but it is very, very useful for me.
> For instance (certainly not only) I am curious about all the programs
> that participate in the current programming contest.

No one is *forcing* you to read GOTO containing programs. You can choose
not to read them.

> I can read and understand code without GOTO much easier, faster, and
> more reliable, so why in heaven should I be interested in something,
> that greatly increases the probability that code that I want to read is
> less readable? I'm not a masochist.

And that is why GOTO containing programs are more costly to maintain. The
answer is to choose not to read them. I suspect that if people want you
to read their programs and you refuse to give them the time because
they contain GOTOs, those people would either remove the GOTOs or
not ask you to read them.


> > I would never use GOTO in any of my Euphoria programs.
> > I would never deny other people the use of GOTO in a Euphoria program. Even
> > though I would find it hard to trust such a program
> 
> Me too. And why should there be any reason to encourage writing of
> programs that are not trustworthy??

The presence of a language contruct in a programming language does not
necessarily encourage its use. For example, I am not, or have ever been,
encouraged to write DOS graphics programs in Euphoria.

> > and I would give it a poor 'style' score blink
> >
> > It sort like the 'free speech' position: I would defend a person's right
> > to expression even if I disagreed with that person's expression.
> 
> Derek, there are already dozens of languages with a GOTO statement.
> There is no need that *every* language should have a GOTO statement, is
> it? Diversity in this context means IMHO, that besides all those
> languages which contain GOTO, there are also languages that don't
> contain it.

Again, the same argument could be used to suggest that some things in Euphoria
ought to be removed because they also exist in other languages. The 
same argument could also be used to reject some changes to Euphoria
(eg. Assignment on declaration) because such a thing already exists in
other languages.

On the other hand, adding a contruct which will help some of your
customer base and *not* hurt other customers, might be worthy of
consideration.

> > I believe that GOTO always leads to programs which are expensive to
> > maintain. However, if that cost is acceptable, then the use of GOTO is
> > fine.
> 
> The one who writes a program with GOTO, and the one who has to maintain
> it, might be different persons. The maintaining person probably was not
> asked beforehand, whether s/he considers the cost acceptable.

Agreed. But I choose my words carefully. So I repeat them "if that cost
is acceptable". In the situation where code is being maintained by people
who did not write it, the cost is nearly always unacceptable. Thus I 
would say that in those situations, which are the majority, that GOTO
is not acceptable.

> Also, Euphoria is the most elegant programming language that I've ever
> seen. GOTO in Euphoria would look like bird droppings on the face of
> Mona Lisa. blink

Euphoria is truely an elegant language. But the "Mona Lisa" still has 
some warts.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu