Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.lang.fortran
Subject: Re: Assigned GOTO
Message-ID: <12416@mimsy.UUCP>
Date: 12 Jul 88 14:40:31 GMT
References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <20664@beta.lanl.gov>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 42

>In article <12362@mimsy.UUCP> I suggested doing `jump to another function
without changing {stack frames / execution environments / whatever you want
to call them}':
>>do it in assembly:
>>	# jump_to, for vax:
		       ---

In article <20664@beta.lanl.gov> jlg@beta.lanl.gov (Jim Giles) writes:
>Think again.  My machine doesn't have any of these mnemonics.

Are you deliberately being irritating?

>... The requirement is for a PORTABLE way of doing the action.

Not necessarily.

>In this respect, a 'better way' would be to allow pointers to code,
>and allow jumps to them ....

Possibly so.  But if you MUST use some language (perhaps it is the only
one you have that is anywhere near suited to the task) and you cannot
do something within that language, the best way is to do it out of that
language---*AFTER* abstracting the operation, so that it can be done on
other machines without too much effort.  (Perhaps it will take a fair
bit of effort; maybe the reason it is not in the language is because it
is *hard* on some machines.  The VAX version I wrote is basically
wrong; a correct version is quite a bit longer.)

>...  But, if this method was indeed the
>most efficient, then assembly is not a good substitute to having
>the feature in the language.

No, but changing the language to add it is also not a good substitute
for having it in the language, unless you intend to convince everyone
else also to change the language in the same way (and are willing to
back off if the next ANSI or ISO or ... standard decides it should be
done differently).

(If it is your own language, of course, do whatever you like.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris