[gambit-list] REPL, values and '#'
Marc Feeley
feeley at iro.umontreal.ca
Mon Aug 22 08:32:46 EDT 2011
On 2011-08-22, at 2:09 AM, Adrien Piérard wrote:
> Hello,
>
> Given that '#' is supposed to be a placeholder for the latest returned
> value, I'd expect
>
>> (values 1 2)
> 1
> 2
>> #
> 1
> 2
>
> instead of
>
>> (values 1 2)
> 1
> 2
>> #
> 2
>
> Or at least, the returned value to be the first one of multiple
> values, not the last.
>
> I think that it's not common to use # and values together in the REPL,
> but I find the above behaviour not very natural.
Personally I find it more natural, and simpler, to think of each result printed by the REPL being added to the REPL history in the order printed. That's why # always refers to the last result printed, which will be the last value if multiple values were the result of the interaction. For example:
> 777
777
> (values 111 222)
111
222
> #
222
> 777
777
> (values 111 222)
111
222
> ##
111
> 777
777
> (values 111 222)
111
222
> ###
777
Marc
More information about the Gambit-list
mailing list