[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



You know what I could use many times? LABELS, ala SCHEME,
however, what would suit me most of those times would
be a simple extension to PROG, a GOSUB ala BASIC.

(prog (common-variable-environment)
      (COND possibly complicated with (GOSUB FROB-1) and (GOSUB FROB-2))
      FROB-1 ...stuff... (RETURN NIL)
      FROB-2 ...stuff... (RETURN NIL))

The value of the GOSUB will would be the value 
of the RETURN next executed.

Question: How easy is it to add a GOSUB feature to existing
lisp compilers?

Note: I have various pattern matchers and finite state machines
which would love to be able to macroexpand into this type of thing.
There is no other way to get this functionality in present lisps
without the use of special variables or variables in structures,
both of which forego the efficiency of register or number-pdl allocation.
(Computed GO's are out of the question of course).

Question: Is this a reasonable feature to have?

-gjc