Bram Geron wrote:
The simplest thing I can imagine to create CL/Perl behavior is to initialize $P0 with nil/undef. But it Doesn't Feel Right(tm) to me doing this every time. What's your opinion? Other question: what should compilers do for languages that don't support multiple values? If such a language allows calling functions from other languages, I can imagine obscure bugs appearing.
Whether a routine returns a null value under certain conditions is determined by the routine, not by a global setting. So, when CL routines are generated by the CL compiler, they'll always generate a default null return value (PMCNULL, or Undef, or a custom Nil).
Languages that don't have syntax for multiple return values will need wrappers for external libraries that send multiple return values, to wrap them in an aggregate data type (array or hash). PIR could provide some shortcuts store return values of a sub call in a specified aggregate, so the wrapping can be generated within the compiler.
Allison