Skip to content

"In general, the left side of ~~ should not be auto-threading" #297

@raiph

Description

@raiph

In general, the left side of ~~ should not be auto-threading

Larry Wall, from https://www.nntp.perl.org/group/perl.perl6.users/2021/06/msg9966.html in May.

This seems like a very serious issue.

Please read Larry's two comments, taking on board the ramifications he outlines for both optimization and correctness/craziness if we let the LHS of ~~ autothread.


Update I should have qualified that last sentence with "if the RHS is not a type object". Instead I did effectively the opposite, writing the following misleading comment, which I've struck out to reduce further confusion:

And then consider this extremely popular (wrong!?!) idiom:

where .all ~~ Foo

(which I recently discovered doesn't work for a lot of cases I hoped it would work for.)

In summary this issue was intended to be "just" about Larry's comments, treating them with the respect their due, and considering how to respond to them to fix existing problems in Rakudo hinted at in the email thread to which Larry contributed.

(Thanks to codesections for his first comment which brought my attention to the fact that Larry had specifically enabled the .all ~~ Foo idiom in 2015 and I now realize it looks like he was not arguing in his comments this year that it should be deprecated -- even if the outcome of this issue is that it does actually end up being deprecated in 6.e.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    languageChanges to the Raku Programming Language

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions