@@ -425,20 +425,27 @@ stringifying non-C<Str> object using the C<.Str> method.
425
425
426
426
= head2 method say
427
427
428
- multi method say(--> Bool:D )
428
+ multi method say()
429
429
430
430
Will L < C < say > |/type/IO::Handle#method_say> to
431
431
L < standard output|/language/variables#index-entry-$*OUT > .
432
- To produce machine readable output use C < .put > instead.
433
432
434
433
say 42; # OUTPUT: «42»
435
434
435
+ What C < say > actually does is, thus, deferred to the actual subclass. In <most
436
+ cases|/routine/say> it calls L < C < .gist > |/routine/gist> on the object, returning
437
+ a compact string representation.
438
+
436
439
In non-sink context, C < say > will always return C < True > .
437
440
438
- say (1,[1,2],"foo",Mu).map: so *.say ;# OUTPUT: «1[1 2]foo(Mu)(True True True True)»
441
+ say (1,[1,2],"foo",Mu).map: so *.say ;
442
+ # OUTPUT: «1[1 2]foo(Mu)(True True True True)»
443
+
444
+ However, this behavior is just conventional and you shouldn't trust on it for
445
+ your code. It's useful, however, to explain certain behaviors.
439
446
440
- C < say > is first printing out, but the outermost C < say > is printing the C < True >
441
- values returned by the C < so > operation.
447
+ C < say > is first printing out in C < *.say > , but the outermost C < say > is printing
448
+ the C < True > values returned by the C < so > operation.
442
449
443
450
= head2 method ACCEPTS
444
451
0 commit comments