goto, cls, wait commands

jean-michel nospam at nospam.fr
Fri Feb 11 17:02:14 EST 2005


"Jeff Shannon" <jeff at ccvcorp.com> a écrit dans le message de
news:110q581greo8g9e at corp.supernews.com...
> jean-michel wrote:
>
> > Hi all,
> > I saw a lot of comments saying GOTO is not usefull, very bad, and we
> > should'nt use it because we don't need it.
> > I think that's true, but only if you *create* programs.
> > But if the goal is to provide some kind of converter to automatically
take
> > an old application written with an old language (using GOTO), and
generating
> > python code, it would certainly a great help to have this (unclean)
feature
> > in native python.
>
> But an automatic translator is certain to be imperfect.  One can no
> more translate mechanically between computer languages than one can
> translate mechanically between human languages -- and we've all seen
> the fun that can be had by machine-translating from language A ->
> language B -> language A, right?  What do you think the effect of that
> sort of meaning-drift would be on application code?
>
> In other words, any translation from one language to another will
> require significant human attention, by someone familiar with both
> languages, to ensure that the original meaning is preserved as close
> as possible.  You're going to have to rewrite chunks of code by hand
> no matter what you do; it'd be silly to *not* take that opportunity to
> purge things like GOTO.
>
> Jeff Shannon
> Technician/Programmer
> Credit International
>

The automated translations are very commonly used actually in computing
industry. If you want an overview, you can try "legacy migration" in google
for instance (or "as400 automated migration" or anything of that kind).
Translate a computer's language is not the same at all than to translate a
human language. In the first case, you have a good chance to know all the
rules. Even if the work is not perfect, it can offer you a chance to
continue to use a 10000 programs application without having to rewrite all
(several years of work indeed).
The last time I did that, I converted arround 6000 cobol programs in a
couple of months, which is obviously not possible by hand (thanks to python
;-). And it was not possible to remove GOTO, because that would really need
to rewrite manually the programs, that means to entirely redo the
application (probably a 20 human years work !).

Regards,
jm





More information about the Python-list mailing list