Note that 'dd' is not part of Perl 6. It is a Rakudo enhancement. (I agree it should be documented, but some disagree..)
dd is describing the value, not the container. it is describing the value you've got in the container, not the container. You can use ".VAR" to check out the container instead of the value: my Real $x; # Make a box that can only hold something 'Real' $x = 3.14; # 3.14 is a Rat, which is also Real, so it will fit in the box. dd $x; # Rat $x = 3.14, a description of the value in the box. say $x.VAR.of; # (Real) -- The box can hold anything that is Real (which includes Rats) On Sun, Sep 16, 2018 at 10:20 PM ToddAndMargo <toddandma...@zoho.com> wrote: > >> On Sun, Sep 16, 2018 at 10:07 PM ToddAndMargo <toddandma...@zoho.com > >> <mailto:toddandma...@zoho.com>> wrote: > >> > >> On 09/16/2018 06:50 PM, Curt Tilmes wrote: > >> > Note that an object that is a Rat also does Real (see > >> > https://docs.perl6.org/type/Rat#Type_Graph) > >> > > >> > say Rat ~~ Real > >> > > >> > True > >> > > >> > Your're making a box that takes a Real, then putting a Rat (that > >> also does Real) into that box. > >> > > >> > It then says "yes, you've got a Rat in there". > >> > > >> > > >> > >> Why is it changing thing on the fly when I tell it not to? > >> I claim foul !!!!!! AAAAAA HHHHHHH !!! > >> > > On 09/16/2018 07:11 PM, Curt Tilmes wrote: > > It isn't changing anything. > > > > You've still got a box ('container') that can only hold something 'Real'. > > > > You just happen to have a value in that box that is a 'Rat'. > > > > It is perfectly fine to put a Rat value in a Real box, because a Rat is > > also a Real (does the 'Real' role). > > > > You can still stick some other Real in the box, and you still can't > > stick anything that isn't a Real in the box. > > > > > > > > > So it is "dd"'s doing. > > > https://docs.perl6.org/routine/dd > 404: Page Not Found > > Search does not work either. > > AAAAHHHH !!!! > > > I just added: > RFE: dd in the docs > https://github.com/perl6/doc/issues/2314 > > Is it just me, or am I the only one does the RTFM thing !!?? > > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Computers are like air conditioners. > They malfunction when you open windows > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >