Re: say vs print for .WHAT

2012-06-29 Thread Smylers
Moritz Lenz writes: > I've tried to answer that here: http://faq.perl6.org/#say Thanks. (And more than tried, I reckon you've succeeded.) Smylers -- http://twitter.com/Smylers2

Re: say vs print for .WHAT

2012-06-29 Thread Moritz Lenz
Am 28.06.2012 23:43, schrieb Smylers: Patrick R. Michaud writes: print will stringify its arguments and write them to $*OUT. say will invoke .gist on its arguments and write them (along with a final newline) to $*OUT. Hi there. What's the rationale for the difference there? Under what circu

Re: say vs print for .WHAT

2012-06-28 Thread Smylers
Patrick R. Michaud writes: > print will stringify its arguments and write them to $*OUT. > > say will invoke .gist on its arguments and write them (along with a > final newline) to $*OUT. Hi there. What's the rationale for the difference there? Under what circumstances are each likely to be use

Re: say vs print for .WHAT

2012-06-28 Thread Patrick R. Michaud
Oops, typo: On Thu, Jun 28, 2012 at 11:39:22AM -0500, Patrick R. Michaud wrote: > To get say to act like "print with a newline", one can do > > say [~] ar That should be say [~] arg1, arg2, arg3 ... For the 'a'.WHAT case, this gives > say [~] 'a'.WHAT use of uninitialized valu

Re: say vs print for .WHAT

2012-06-28 Thread Patrick R. Michaud
On Thu, Jun 28, 2012 at 09:41:48PM +0530, Siddhant Saraf wrote: > (In Rakudo's REPL) > > > say 'a'.WHAT; > Str() > > print 'a'.WHAT; > use of uninitialized variable $v of type Str in string context > True > > > > What is happening here? Is this a bug? > ( Coz I don't see any $v variable anywhere

Re: say vs print for .WHAT

2012-06-28 Thread yary
> May I also take this opportunity to ask someone to explain to me what > exactly are the > differences between say and print? Might be that "say" calls ".gist" whereas "print" stringifies?

Re: say vs print for .WHAT

2012-06-28 Thread Parrot Raiser
> May I also take this opportunity to ask someone to explain to me what > exactly are the differences between say and print? > I can't help you with the tricky stuff, but the difference between "say" and "print" is that "say" appends a newline (\n) to the output, while "print" doesn't. The \n is

say vs print for .WHAT

2012-06-28 Thread Siddhant Saraf
(In Rakudo's REPL) > say 'a'.WHAT; Str() > print 'a'.WHAT; use of uninitialized variable $v of type Str in string context True > What is happening here? Is this a bug? ( Coz I don't see any $v variable anywhere.) What is the "True" indicating? (in niecza's REPL) niecza> say 'a'.WHAT; Str() niecz