On Mon, May 18, 2020 at 10:18 AM Brad Gilbert wrote:
>
> You are misunderstanding what `put` does.
>
> It does not print the internal representation.
>
> What it does do is turn the value into a `Str` object, then print it with a
> trailing newline.
>
> It just so happens that objects will by
On Mon, May 18, 2020 at 4:03 AM Patrick R. Michaud wrote:
>
> "say $x" is essentially equivalent to "put $x.gist".
>
> Since Nil is undefined (roughly equivalent to a type object), Nil.gist has a
> string value of "Nil" and can be printed. However, attempting to convert Nil
> directly into a
You are misunderstanding what `put` does.
It does not print the internal representation.
What it does do is turn the value into a `Str` object, then print it with a
trailing newline.
It just so happens that objects will by default return something that looks
like an internal representation when
"say $x" is essentially equivalent to "put $x.gist".
Since Nil is undefined (roughly equivalent to a type object), Nil.gist has a
string value of "Nil" and can be printed. However, attempting to convert Nil
directly into a Str throws an error because that's attempting to stringify an
Hello,
I'm interested in knowing the differences between the return values
when "say" is used compared to "put". My understanding is that "put"
returns Raku's internal representation of a value held by a variable,
while "say" is merely "put" with the .gist method called on it (a
"human readable",