if $s ~~ /$=[\w+]/ -> $/ { say $ }
> On 30 Dec 2022, at 03:54, Vadim Belman wrote:
>
> Optimizations, yes... But then, how could we not use code like `if $s ~~
> /$=[\w+]/ { say $ }`?
>
> Speaking of the subject itself, I don't remember how sequences are actually
> implemented in details, but
I guessed this answer. :) It makes it extra typing and some linenoise. So, I
wouldn't be really happy about it.
Use of `with` would be less cumbersome, actually. So `with $s ~~ /.../ {
. }`. Or `$s ~~ /.../ andthen .`. The "extra typing issue" is not
gone in this case, but the code clarity doe
Ah, got it, thanks.
It's mildly vexing, but the kind of side-effecty coding I described isn't a
great idea in general. I only stumbled across the phenomenon while code
golfing.
As a side note, code like this:
sub f { 1 ... * ~~ /9/; $/ }
...produces an untrue warning "Useless use of ... in sin
It is not "untrue". The sequence you produced goes nowhere. Thus the sink
context.
Best regards,
Vadim Belman
> On Dec 30, 2022, at 11:08 AM, Sean McAfee wrote:
>
> Ah, got it, thanks.
>
> It's mildly vexing, but the kind of side-effecty coding I described isn't a
> great idea in general. I
On Fri, Dec 30, 2022 at 8:51 PM Vadim Belman wrote:
> It is not "untrue". The sequence you produced goes nowhere. Thus the sink
> context.
>
"Sink context" is true.
"Useless use" is debatable, at least.
Eirik
On Fri, Dec 30, 2022 at 4:12 PM The Sidhekin wrote:
> On Fri, Dec 30, 2022 at 8:51 PM Vadim Belman wrote:
>
>> It is not "untrue". The sequence you produced goes nowhere. Thus the sink
>> context.
>>
>
> "Sink context" is true.
>
> "Useless use" is debatable, at least.
>
It's not useless b