On Sat, May 30, 2020 at 04:22:56PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-05-30 04:19, Peter Pentchev wrote:
> > On Fri, May 29, 2020 at 04:36:41PM -0700, ToddAndMargo via perl6-users 
> > wrote:
> 
> > > Hi Peter,
> > > 
> > > No doubt it is operating as designed.
> > > 
> > > It would be a lot more friendly if "Str:U" was
> > > changed to "Str:D". Oh please!   Oh Please!
> > 
> > Sorry, I don't really understand what you mean.  "Str:U" means
> > an undefined string - that's what you're calling .starts-with() on.
> > "Str:D" means a defined string - that's what .starts-with() wants to
> > operate on.  What do you mean "change Str:U to Str:D" - the error
> > message says "you invoked it on an undefined string, it wants to be
> > invoked on a defined string", what do you want to change?
> > 
> > Now, if you meant "change Str:U to 'an undefined string'", mmmm, what
> > I was trying to explain is that the error message is generic, it covers
> > any wrong calls of functions on any types... it does not really try to
> > get into what the types are (it cannot, in the general case for any
> > other type).
> > 
> > G'luck,
> > Peter
> > 
> 
> 
> Hi Peter,

Apologies if what I write further down may come off as a little bit
brusque. It's just that... see at the end, I'm getting a bit of
deja vu here :)

[snip]
> So my beef is when you feed these guys an undefined
> variable, that they needs to tell you it requires
> a "defined" variable.  Not a bunch of useless rubbish.
> For example (useless rubbish):
> 
>        Cannot resolve caller starts-with(Str:U: Str:D);

This is not useless rubbish. It says "you tried to call starts-with() on
something that was an undefined string, and then you passed a defined
string as a parameter."

>        none of these signatures match
> 
>        (Cool:D: Cool:D $needle, :i(:$ignorecase)!,
>            :m(:$ignoremark), *%_ --> Bool)

This is not useless rubbish. It says "you may call starts-with() on
something that is defined and is of the "Cool" type and pass another
defined "Cool" thing as a parameter, and then a couple of other
parameters."

[snip]
>        (Str:D: Str:D $needle, :i(:$ignorecase)!,
>            :m(:$ignoremark), *%_ --> Bool)

This is not useless rubbish. It says "you may call starts-with() on
something that is a defined string, and pass another defined string as a
parameter, and then maybe a couple of other parameters."

> And I know, I don't get a vote on the matter.

It's not that you don't get a vote on the matter. It's that there have
been several times (let's put it that way) when people have told you
that to read the Raku documentation and to be able to fully use
the powers of Raku, it would *really*, *really* help you to figure out
those pesky signature things.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

Attachment: signature.asc
Description: PGP signature

Reply via email to