References: <d7318f6b-37e5-59d3-9b42-4af9e1ecc...@zoho.com> In-Reply-To: <d7318f6b-37e5-59d3-9b42-4af9e1ecc...@zoho.com>
toddandma...@zoho.com wrote: > If you go to https://docs.raku.org/ and look up your variable, > scroll down and look for "type graph", it will tell you what > your variable is a member of. Yes, that's right. For any particular case, you could check the type graphs and get an idea what they have in common. In particular, the roles involved (indicated in Blue) are often critical if you're trying to spot similar capabilties (which I'm calling vaguely "compatibility" for now). But then, in a case like this one, how would you know in advance that it would work, without Just Trying It: my @monsters = < godzilla grendel wormface blob >; my $cool_monsters = < godzilla ghidra mothera >.Set; say @monsters.WHAT; # (Array) say $cool_monsters.WHAT; # (Set) my $just_monsters = @monsters (-) $cool_monsters; say $just_monsters; # Set(blob grendel wormface) A set difference operation seems to know what to do with arrays, without any explicit conversion steps. I don't think you can get that just from studying the type graphs Anyway, I'm wondering if there's some sort of way of getting a general answer to the question of what works with what. > Any any one that acts like Raku's OOP is h-a-r-d if pulling > your strings. I stink at programming and I learned it, despite > some of the insults I got thrown at me (not from this quarter, > thank goodness) By the way, I have to say I appreciate your stick-to-itiveness. It's not at all a bad thing to have some beginners around who are willing to be loud about it-- it's not supposed to be an experts club.