Currently, P and O return rvals, meaning that you can't do something like this to print and then reverse a variable:
But is there any reason not to allow that behavior? P and O don't modify their operand at all, they just have the side effect of outputting it. Since they pass it through unchanged, why not pass it through as an lvalue?
(Inspired by StringgnirtSStringgnirtSStringgnirtS, where the current shortest solution is 9 bytes, but an 8-byte solution L#a;R:Oa would be possible with this change.)
Currently,
PandOreturn rvals, meaning that you can't do something like this to print and then reverse a variable:But is there any reason not to allow that behavior?
PandOdon't modify their operand at all, they just have the side effect of outputting it. Since they pass it through unchanged, why not pass it through as an lvalue?(Inspired by StringgnirtSStringgnirtSStringgnirtS, where the current shortest solution is 9 bytes, but an 8-byte solution
L#a;R:Oawould be possible with this change.)