-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Should we detect/Deny using $_ as a user defined variable? #3695
Copy link
Copy link
Closed
Labels
Breaking-Changebreaking change that may affect usersbreaking change that may affect usersCommittee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.WG-Languageparser, language semanticsparser, language semantics
Milestone
Description
This works but it seems like terrible practice - should we detect/deny using $_ as a user defined variable?
(At PSCONF.EU and a customer's colleague is doing this in his code)
foreach (
{
$.name
}
This also works:
$_ = "test"
write-host -ForegroundColor red "Thiis is a $_ "
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Breaking-Changebreaking change that may affect usersbreaking change that may affect usersCommittee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.WG-Languageparser, language semanticsparser, language semantics