Conversion from proprietary satellite control script language

Peter Schneider-Kamp petersc at stud.ntnu.no
Fri Jun 16 05:58:40 EDT 2000


TJ Judson wrote:
> 
> 1. It doesn't exist, but it would not be hard to add (The necessary
> opcodes are there -- well, the one you need: JUMP_ABSOLUTE --
> mwh21 at cam.ac.uk)

It wouldn't be hard? I just reread the thread on the subject from
this April and there were some serious problems:
* gotos into blocks
* gotos out of blocks
* some reducibility problem

> 2. There are a few "good" uses for it:  (jump to cleanup code, for
> use by code generators, as a performance optimization -- John
> Mitchell)

a) jump to cleanup code can IMHO be done through
   try: ... {finally|except}  ...
   constructions.
b) Can you elaborate the code generators point?
c) there is much more room for performance optimization at other
   times and places (optimizing compiler etc.).
   anyway I would not like to see a possibly harmful statement
   like goto added to Python for performance optimization. yuck.

> I have a new and much better reason :-) to add a goto statement... To
> support conversions from other, existing scripts/languages.

I don't mean to be flaming, but I cannot resist the following<wink>:

Let's add lodsb, lodsw, lodsd, stosb, stosw, stosd, movzx and some
of their friends to python. It would make conversion from the
most used assembler languages much easier. Using a dissassembler
we could then easily port Microsoft Word to Python. Just do a:
disasm "/mnt/win/Program Files/Microsoft Office/Office/msword.exe" |
asm2py > msword.py

Really, I don't see a legitimate use for goto in Python.

> I think it would be neat if Python were being used to fly satellites.
> Or it could be provided only as a patch...

That would, of course, be okay, if somebody figures out how to do it.

would-even-help-to-create-such-a-patch-ly y'rs
Peter
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter at schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de




More information about the Python-list mailing list