読めないと分かりませんよ。

On Sun, May 31, 2020, 02:23 ToddAndMargo via perl6-users <
perl6-us...@perl.org> 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,
>
> What a second.
>
> https://docs.raku.org/routine/starts-with
> multi method starts-with(Str:D: Str(Cool) $needle, :i(:$ignorecase),
> :m(:$ignoremark) --> Bool:D)
>
> https://docs.raku.org/routine/contains
> method contains(Cool:D: |c)
>
> I had incorrectly presumed that since neither of
> these two complained about `Str:D` not being defined
> that it was specified as `Str:U`
>
> 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);
>         none of these signatures match
>
>         (Cool:D: Cool:D $needle, :i(:$ignorecase)!,
>             :m(:$ignoremark), *%_ --> Bool)
>         (Cool:D: Cool:D $needle, :m(:$ignoremark)!, *%_
>             --> Bool)
>         (Cool:D: Cool:D $needle, *%_ --> Bool)
>         (Str:D: Str:D $needle, :i(:$ignorecase)!,
>             :m(:$ignoremark), *%_ --> Bool)
>         (Str:D: Str:D $needle, :m(:$ignoremark)!, *%_ --> Bool)
>         (Str:D: Str:D $needle, *%_ --> Bool)
>         in block <unit> ...
>
> And I know, I don't get a vote on the matter.
> -T
>

Reply via email to