Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"while $foo ~~ m:g//" should warn #2052

Closed
p6rt opened this issue Aug 10, 2010 · 5 comments
Closed

"while $foo ~~ m:g//" should warn #2052

p6rt opened this issue Aug 10, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Aug 10, 2010

Migrated from rt.perl.org#77144 (status was 'rejected')

Searchable as RT77144$

@p6rt
Copy link
Author

p6rt commented Aug 10, 2010

From @gfldex

my $s = 'abcd'; while $s ~~ m​:g/(.)/ { print $0 };

Neither works nor does it give a warning. It's basic perl5 thinking and
will cause quite a bit confusion for converts.

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

From @moritz

Fwiw, m​:g// wasn't working at all, and I've disabled it again until I
find a way for it to actually return list of Match objects.

I don't see how this can be made to warn in safe and generic way that
doesn't totally bork the separation of concerns within the compiler.

Maybe warning about this construct should be the job of an external
lint-like tool instead?

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 24, 2014

From @coke

On Wed Aug 11 09​:37​:18 2010, moritz wrote​:

Fwiw, m​:g// wasn't working at all, and I've disabled it again until I
find a way for it to actually return list of Match objects.

I don't see how this can be made to warn in safe and generic way that
doesn't totally bork the separation of concerns within the compiler.

Maybe warning about this construct should be the job of an external
lint-like tool instead?

02​:51 < TimToady> [Coke]​: detecting list/scalar context confusion is going to
  be hard in a language that handles context lazily

Rejecting ticket. Sorry about the delay.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 6, 2014

@usev6 - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Oct 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant