develooper Front page | perl.perl6.language | Postings from October 2018

Re: "put" vs "say"

Thread Previous | Thread Next
From:
Timo Paulssen
Date:
October 21, 2018 16:31
Subject:
Re: "put" vs "say"
Message ID:
19b1097f-3ed1-1e01-f24e-ed1d2e5baecf@wakelift.de
put is meant for machines, while say is meant for humans.

this is implemented by having say call the .gist method and put calling
the .Str method.

Try using say and put on a list of a thousand elements or more and
you'll see what I mean.

HTH
  - Timo

On 21/10/2018 18:29, Parrot Raiser wrote:
> "put" and "say" seem to be redundant, but I'm sure there's a good
> reason for having 2 output commands.
>
> Would anyone care to comment on how they differ and why, or point to
> an explanation?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About