On Sun, Aug 24, 2003 at 12:09:21PM +0200 it came to pass that Leopold Toetsch wrote:
> Parrot programs have commandline info in P0 but there is no means to 
> communicate an exit-status to the shell.
> We could do:
> 
> 1) REG_INT(5) ...has exit code
> 2) end Ix ... end opcode has exit code
> 3) exit_code Ix .. set exit code
> 
> 1) breaks existing programs but fits calling conventions
> 2) could break tools, which assume C<end> is opcode #0
> so probably 3) or ...
> 
> Comments welcome
> leo

My EUR 0,02 is:

- I think that we (parrot) are currently in a state that we
  should not be too concerned about backward compatibility
  and breaking existing programs. There will be an infinite
  amount of time when we will need to worry about it, so
  let's not start too soon. Whilst we (mostly: you :-) are 
  developing parrot and have not declared anything "stable",
  let's go for the best solutions within the defined 
  architecture...

- Because of that, I like option 1). Adding a new "exit_code"
  op seems ugly to me. What would happen if I use "exit_code"
  halfway through the program? (I can imagine, but still it
  could make it hard to debug where in Jupiter's name the
  exit code has been set. If this is the way to go, I would 
  be happier with a PMC type that abstracts the interpreter
  and use an "exit-code" attribute...

- I like 2) too, since it matches the patterns in a lot of
  languages that can set the return code in the exit/return/end
  statement.

++Jos.nl




-- 
La vida no es la que uno vivió, sino la que
recuerda y cómo la recuerda para contarla...
~ Gabriel García Márquez

Reply via email to